springboot项目初始化加载
@Component public class Runner implements CommandLineRunner { @Override public void run(String... args) throws Exception { System.out.println("The Runner start to initialize ..."); } }
项目启动的时候加载缓存之类的可以使用此方法,主要是实现CommandLineRunner,然后重写run方法