SpringBoot定时任务注解@Scheduled中fixedRate和fixedDelay
@Scheduled(fixedRate = 2000) public void myJob1(){ System.out.println(LocalDateTime.now()+"定时任务O(∩_∩)O"); //休眠模拟代码块运行的时间 try { TimeUnit.SECONDS.sleep(3); } catch (InterruptedException e) { e.print
原创
2021-12-06 20:08:05 ·
2448 阅读 ·
0 评论