@Schedueld 定时任务
- 首先,在启动类中添加 @EnableScheduling 注解,开启定时任务
/**
* 应用启动入口
* Created by pt on 2020/5/16.
*/
@SpringBootApplication
@EnableScheduling //开启定时任务
public class PtApplication{
public static void main(String[] args) {
@Schedueld 定时任务
/**
* 应用启动入口
* Created by pt on 2020/5/16.
*/
@SpringBootApplication
@EnableScheduling //开启定时任务
public class PtApplication{
public static void main(String[] args) {