使用@Scheduled创建定时任务
This commit is contained in:
@@ -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()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user