springboot动态设置定时任务Cron参数表达式
由于项目中有多个定时任务,cron表达式在代码里面维护起来略显困难,故将cron表达式写在配置文件中。
application.properties:
1.配置文件
system.bEnableStatisticCurrentCron=1
相对代码示例
@Scheduled(fixedDelayString = "${system.bEnableStatisticCurren...
原创
2019-02-15 10:17:23 ·
3762 阅读 ·
1 评论