上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页
摘要: Spring中的事件机制 Spring对事件机制也提供了支持,一个事件被发布后,被对应的监听器监听到,执行对应方法。 Spring内已经提供了许多事件,ApplicationEvent可以说是Spring事件的顶级父类。 ApplicationListener 是监听器的顶级接口,事件被触发后,on 阅读全文
posted @ 2020-10-20 09:51 cgl_dong 阅读(70) 评论(0) 推荐(0) 编辑
摘要: Spring后置处理器BeanPostProcessor Spring提供了许多扩展点,如FactoryBean、Aware,这里还有BeanPostProcessor 在Spring的生命周期中,BeanPostProcessor在初始化前后处理bean。 Spring中的bean每个都会经过Be 阅读全文
posted @ 2020-10-20 09:49 cgl_dong 阅读(68) 评论(0) 推荐(0) 编辑
摘要: 定时任务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 阅读(114) 评论(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) 编辑
摘要: SpringBoot--整合XML格式数据传输 现在前后端交互都使用json格式,但是在某些特定领域,还是要求使用xml格式数据进行传输。 在前台传输到后台的xml格式数据,可以将其封装到pojo实体类中,也可以将pojo实体类响应回xml格式的数据。 1、导入依赖 <dependency> <gr 阅读全文
posted @ 2020-10-16 16:56 cgl_dong 阅读(2735) 评论(0) 推荐(1) 编辑
摘要: SpringData中对mongoDB提供了支持,除了template方法外,还支持jpa格式的Repository. <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-d 阅读全文
posted @ 2020-10-15 15:41 cgl_dong 阅读(120) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页