Java
schedule 标签描述

@Scheduled(fixedDelay=5000) @Scheduled(fixedDelay=5000),是启动后,马上开始第一次执行任务的么?应用启动时,任务会被立即执行。 执行完成后,会等待5秒(因为fixedDelay设置为5000毫秒),然后再次执行任务。 以后每次执行完任务,都会等待5秒后再次执行。 类的注解: @Configuration @EnableScheduling