Springboot集成Ehcache,并结合CommandLineRunner接口实现Springboot项目启动时热加载数据库数据至缓存

一、Springboot开启缓存,并引入ehcache依赖。java <!-- 开启cache缓存 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-cache</artifactId> </dependency> <!-- 整合ehcache缓存 --> <
相关文章
相关标签/搜索