在springboot中已经集成了定时任务,只需要在启动类上加注解@EnableScheduling即可 例如: 添加类加上@Component注解,添加方法加上@Scheduler即可 相关文章: 2021-07-09 2022-12-23 2021-07-20 2021-07-25 2022-01-14 2021-10-20 2022-12-23 2022-12-23