摘要: 一、Spring抽象缓存 1. Spring从3.1开始定义了org.springframework.cache.Cache和org.springframework.cache.CacheManager接口来统一不同的缓存技术;并支持使用JCache(JSR 107)注解简化开发。 2. Cache 阅读全文
posted @ 2019-06-10 18:38 一条路上的咸鱼 阅读(684) 评论(0) 推荐(0) 编辑
摘要: 一、启动流程 1. 创建SpringApplication对象 2. 运行run方法 3. 事件监听机制 需要配置在META INF/spring.factories中的事件监听器。 ApplicationContextInitializer SpringApplicationRunListener 阅读全文
posted @ 2019-06-10 18:36 一条路上的咸鱼 阅读(880) 评论(0) 推荐(0) 编辑
摘要: 一、JDBC方式 1. 引入starter。 2. 配置application.properties 3. 配置后默认使用org.apache.tomcat.jdbc.pool.DataSource作为数据源;数据源的相关配置都在org.springframework.boot.autoconfig 阅读全文
posted @ 2019-06-10 18:32 一条路上的咸鱼 阅读(377) 评论(0) 推荐(0) 编辑