spring boot启动后执行方法

@Component
public class InitProject implements ApplicationRunner {
private static final Logger logger = LoggerFactory.getLogger(InitProject.class);

@Override
public void run(ApplicationArguments args){

//初始化数据  执行方法


}
}

posted on 2018-10-10 15:23  天天天12345  阅读(182)  评论(0编辑  收藏  举报

导航