**
* spring 自带的定时器
*/
@Component
@Configurable
@EnableScheduling //标注启动定时任务。
public class ScheduleTask {
@Scheduled(cron = "0 0 0 * * ?")
public void reportCurrentByCron(){
System.out.println("666");
}
}
**
* spring 自带的定时器
*/
@Component
@Configurable
@EnableScheduling //标注启动定时任务。
public class ScheduleTask {
@Scheduled(cron = "0 0 0 * * ?")
public void reportCurrentByCron(){
System.out.println("666");
}
}