摘要: Jackson 一、JSON 1、简介 JSON: JavaScript Object Notation(JavaScript 对象表示法) JSON 是存储和交换文本信息的语法。类似 XML JSON 比 XML 更小、更快,更易解析。 JSON可以被各种语言使用 2、语法 2.1、json主要通 阅读全文
posted @ 2020-10-20 14:40 cgl_dong 阅读(118) 评论(0) 推荐(0) 编辑
摘要: Redis是一款NOSQL数据库,同时可以充当缓存中间件。在 Spring Boot 中,默认集成的 Redis 就是 Spring Data Redis,默认底层的连接池使用了 lettuce ,开发者可以自行修改为自己的熟悉的,例如 Jedis。 Spring Data Redis 针对 Red 阅读全文
posted @ 2020-10-20 13:34 cgl_dong 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 1、@PropertiesSource注解 这是Spring中的注解,用于读取属性文件,默认读取classpath下的文件。 如在classpath路径下的a.properties中: desc="is a property" 通过Value注解可以去到属性: @Component @Propert 阅读全文
posted @ 2020-10-20 09:52 cgl_dong 阅读(538) 评论(0) 推荐(0) 编辑
摘要: 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) 编辑