springboot实现定时器功能

首先在启动类上添加一个注解java @EnableScheduling 再写一个定时工具类实现逻辑代码工具 @Component public class Scheduler{ private static final SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm:ss"); //每隔5分钟执行一次
相关文章
相关标签/搜索