摘要: 最近项目中用到定时任务,项目运行后,定时把redis中的数据更新到mysql中; 一、在项目启动类添加 @EnableScheduling 注解 二、测试启动类 @Component //交给spring管理 public class TestJob { @Scheduled(cron = "0/5 阅读全文
posted @ 2022-06-13 18:04 成强 阅读(318) 评论(0) 推荐(0) 编辑