springboot在配置文件中控制 @Scheduled 开关
配置文件中控制 @Scheduled 定时任务开关详见: https://segmentfault.com/a/1190000018805591配置文件//控制项目中所有@Scheduled定时任务开关enable: scheduled: false代码新建ScheduledCondtion(类名随意)并实现Condition ,用来读取配置文件中的开关,返回一个boolean类型的参数//Condition 引用 import org.springframework.conte
原创
2021-06-18 10:53:02 ·
3847 阅读 ·
0 评论