SpringBoot 定时器设置

可以通过添加注解来实现 步骤: 1. application 添加注解@EnableScheduling 2.定时器所触发的类添加注解@Component 3.方法添加注解@Scheduled(cron="0 59 23 * * ?")   demo: 新建一个Springboot项目,在Application中添加@EnableScheduling 新建一个定时器任务类,添加@Component
相关文章
相关标签/搜索