1.启动类添加@EnableScheduling
2.创建定时任务类,并在类上使用@Compnent
3.创建一个方法,并在方法上使用@Scheduled(cron = "0 30 14 * * ?")
在线Cron表达式生成器:http://cron.qqe2.com/
springboot整合Quartz实现动态配置定时任务
微信扫一扫
1.启动类添加@EnableScheduling
2.创建定时任务类,并在类上使用@Compnent
3.创建一个方法,并在方法上使用@Scheduled(cron = "0 30 14 * * ?")
在线Cron表达式生成器:http://cron.qqe2.com/
springboot整合Quartz实现动态配置定时任务
相关推荐