摘要: 随便创建一个类,@Component交给spring管理,用注解@EnableScheduling,让定时任务生效 方法上加注解:@Scheduled(cron = "你的cron表达式" ) 简单实现如下: @Component@EnableSchedulingpublic class TimeJ 阅读全文
posted @ 2021-12-06 23:07 何足道66 阅读(201) 评论(0) 推荐(0)
摘要: public class ListDistinctExample { public static void main(String[] args) { List<Integer> list = new ArrayList<Integer>() {{ add(1); add(3); add(5); a 阅读全文
posted @ 2021-12-06 22:49 何足道66 阅读(1444) 评论(0) 推荐(0)