定时任务类
上加
@Component 注解
定时任务方法上加
@Scheduled(cron = "0/20 * * * * ?") 注解
但是定时任务不能调起
经过测试还需要在spring boot 启动类上加
@EnableScheduling 注解
才启动成功
定时任务类
上加
@Component 注解
定时任务方法上加
@Scheduled(cron = "0/20 * * * * ?") 注解
但是定时任务不能调起
经过测试还需要在spring boot 启动类上加
@EnableScheduling 注解
才启动成功
@Scheduled注解
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M