@EnableScheduling:开启定时任务。 @Scheduled(cron=" "):定时任务表达式。 @EnableAsync:开启异步。 @Async:使用方法比较简单,编写一个测试方法并加上@Async注解即可