使用@Scheduled创建定时任务

This commit is contained in:
程序猿DD
2016-05-16 14:20:22 +08:00
parent 3434f01131
commit 2a1c36c12f
@@ -13,7 +13,7 @@ public class ScheduledTasks {
@Scheduled(fixedRate = 5000)
public void reportCurrentTime() {
System.out.println("现在时间:" + dateFormat.format(new Date()));
System.out.println("当前时间:" + dateFormat.format(new Date()));
}
}