CommandLineRunner、ApplicationRunner 接口

       若是咱们想在项目启动后作一些事情(如加载定时任务,初始化工做),能够使用spring提供的CommandLineRunner、ApplicationRunner 接口,在容器启动成功后的最后一步回调(相似开机自启动)。java 1. CommandLineRunner接口 /** * Interface used to indicate that a bean should <em
相关文章
相关标签/搜索