0
点赞
收藏
分享

微信扫一扫

CommandLineRunner与ApplicationRunner

艾米吖 2022-03-14 阅读 50
spring
   CommandLineRunner、ApplicationRunner 接口是在容器启动成功后的最后一步回调(类似开机自启动)。
   CommandLineRunner和ApplicationRunner接口的作用是完全一致的,唯一不同的则是接口中待实现的run方法,其中CommandLineRunner的run方法参数类型与main一样是原生的String[] 类型,而ApplicationRunner的run方法参数类型为ApplicationArguments类型
举报

相关推荐

0 条评论