在项目启动的时候需要做一些初始化的操作,比如初始化线程池、提前加载mysql数据库到缓存等。Springboot中CommandLineRunner接口的 Component 会在所有 Spring Beans都初始化之后SpringApplication.run()之前执行,非常适合在应用程序启动 Read More
posted @ 2020-12-02 15:36 kwz Views(2842) Comments(0) Diggs(0) Edit