Springboot 自带定时器 今天的砖搬完了吗 2023-03-29 44 阅读1分钟 启动类application,增加注解 @EnableScheduling 方法实现 @Async @Scheduled( cron = "0 0 1 * * ?") //每天凌晨1点执行一次 public void run() { noticeReportService.updateState(); }