摘要: 定时任务quartz 触发器 Trigger: 什么时候工作 任务 Job: 做什么工作 调度器 Scheduler: 搭配 Trigger和Job 定义一个job 实现quartz的Job接口,重写需要执行的方法。 Job 其实是由 3 个部分组成: JobDetail: 用于描述这个Job是做什 阅读全文
posted @ 2020-10-17 14:18 cgl_dong 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 最近用xml的数据格式比较多,所以简单记录一下这些类库的使用。 dom4j dom4j用dom模型的方式解析xml数据。 <!--依赖包--> <dependency> <groupId>org.dom4j</groupId> <artifactId>dom4j</artifactId> <vers 阅读全文
posted @ 2020-10-17 09:29 cgl_dong 阅读(115) 评论(0) 推荐(0) 编辑
摘要: joda-time是处理时间的简单的库,比自带的库有时候好用的多。 <dependency> <groupId>joda-time</groupId> <artifactId>joda-time</artifactId> <version>2.9.2</version> </dependency> 阅读全文
posted @ 2020-10-17 09:16 cgl_dong 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 1、ApplicationContext应用程序上下文 ApplicationContext是最常用的Spring ioc容器,他实现了很多接口: BeanFactory:Spring 管理 Bean 的顶层接口,我们可以认为他是一个简易版的 Spring 容器。 ApplicationEventP 阅读全文
posted @ 2020-10-17 09:13 cgl_dong 阅读(362) 评论(0) 推荐(0) 编辑
摘要: Spring中的事件机制 Spring对事件机制也提供了支持,一个事件被发布后,被对应的监听器监听到,执行对应方法。 Spring内已经提供了许多事件,ApplicationEvent可以说是Spring事件的顶级父类。 ApplicationListener 是监听器的顶级接口,事件被触发后,on 阅读全文
posted @ 2020-10-17 09:11 cgl_dong 阅读(86) 评论(0) 推荐(0) 编辑
摘要: java处理时间的基础类 jdk8 中对时间处理的api有 LocalDate、LocalDateTime,LocalTime等,相对之前的Date更加好用。 格式化时间的有DateTimeFormatter,且是线程安全的。 System.out.println("日期: "+LocalDate. 阅读全文
posted @ 2020-10-17 09:04 cgl_dong 阅读(92) 评论(0) 推荐(0) 编辑