spring boot启动后执行方法
@Component
public class InitProject implements ApplicationRunner {
private static final Logger logger = LoggerFactory.getLogger(InitProject.class);
@Override
public void run(ApplicationArguments args){
//初始化数据 执行方法
}
}