首页 > 其他分享 >CommandLineRunner

CommandLineRunner

时间:2023-02-16 17:12:54浏览次数:45  
标签:CommandLineRunner run void args class public

CommandLineRunner的使用 - 盐小果 - 博客园 (cnblogs.com)

 

问题:在项目启动时,我们需要加载或者预先完成某些动作,该怎么办呢?
解决办法:在springBoot中是实现CommandLineRunner接口类
CommandLineRunner翻译过来就是“命令行运行者”,很形象

标签:CommandLineRunner,run,void,args,class,public
From: https://www.cnblogs.com/jiangzishun/p/17127422.html

相关文章

  • spring ApplicationListener 和 CommandLineRunner
    ApplicationContext事件机制是观察者设计模式的实现如果容器中有一个ApplicationListenerBean,每当ApplicationContext发布ApplicationEvent时,ApplicationListenerB......