
ehcache
gnail_oug
这个作者很懒,什么都没留下…
展开
-
Spring Boot教程(十四):Spring Boot集成ehcache缓存
Spring Boot的cache支持多种缓存,参考缓存支持,其中常用的有EhCache和Redis,Redis需要安装redis服务器,而EhCache不依赖任何第三方软件,只需引入jar即可。下面主要介绍ehcache的集成方法。一、项目准备直接使用Spring Boot教程(十一):Spring Boot集成fastjson章节的源码。二、添加依赖在pom.xml里添加ehc...原创 2018-05-16 11:31:36 · 7198 阅读 · 7 评论 -
Spring Boot教程(十八):Spring Boot集成shiro ehcache
一、项目准备为了方便,这里直接使用Spring Boot教程(十六):Spring Boot集成shiro章节的源码。二、添加依赖<!-- cache --><dependency> <groupId>org.springframework.boot</groupId> <artifactId>sprin...原创 2018-06-14 19:12:17 · 4355 阅读 · 2 评论 -
Spring Boot教程(十九):Spring Boot集成shiro ehcache(使用shiro的缓存管理)
一、项目准备为了方便,这里直接使用Spring Boot教程(十六):Spring Boot集成shiro章节的源码。二、添加依赖<!-- cache --><dependency> <groupId>org.springframework.boot</groupId> <artifactId>sprin...原创 2018-06-15 15:10:35 · 9719 阅读 · 2 评论 -
Spring Boot整合shiro后导致@Cacheable、@Transactional等注解失效的问题
一、问题描述Springboot整合shiro前,service里的@Cacheable、@Transactional等注解都正常使用。整合shiro之后,UserRealm类里自动注入的service中的注解失效UserRealm代码如下:public class UserRealm extends AuthorizingRealm { private static...原创 2018-06-15 15:37:28 · 4029 阅读 · 3 评论 -
同一个类里@Cacheable缓存不起作用
一、问题描述环境:springboot 2.1.2.RELEASEehcache 2.10.6如下,selectAll()方法通过@Cacheable设置了缓存,在get(String paramKey)方法里面,调用selectAll()时不会使用缓存。但其他类调用selectAll()方法时,缓存有效。@Servicepublic class SystemConfigServ...原创 2019-05-15 17:18:34 · 4989 阅读 · 2 评论