SpringBoot - 启动的时候运行一些特定的代码
摘要:
可以实现接口 ApplicationRunner 或者 CommandLineRunner,这两个接口实现方式一样,它们都只提供了一个 run 方法。 @Component public class MyBean implements CommandLineRunner { @Override pu 阅读全文
posted @ 2022-02-15 10:14 每天积极向上 阅读(161) 评论(0) 推荐(0) 编辑