第一步:
@Service
public class TaskTest {
@Scheduled(cron = "0/3 * * * * ?")
public void info(){
System.out.println("任务管理器。。。。");
}
}
第二步:
在入口类中加入启动注解
@EnableScheduling //Spring Task任务开启
第一步:
@Service
public class TaskTest {
@Scheduled(cron = "0/3 * * * * ?")
public void info(){
System.out.println("任务管理器。。。。");
}
}
第二步:
在入口类中加入启动注解
@EnableScheduling //Spring Task任务开启