mybatis plus内置Service接口方法Ehcache缓存无效
文章目录
springboot+mybatis 配置缓存Ehcache
1.pom.xml
2.ehcache.xml
resources文件夹下ehcache.xml文件
3.mappers.xml自定义缓存ehcache,添加查询方法
4.测试内置Service接口方法和自己添加的查询方法
5.测试结果,内置Service接口方法不走缓存,添加的查询方法,走缓存。
1.pom.xml
2.ehcache.xml
resources文件夹下ehcache.xml文件
3.mappers.xml自定义缓存ehcache,添加查询方法
4.测试内置Service接口方法和自己添加的查询方法
5.测试结果,内置Service接口方法不走缓存,添加的查询方法,走缓存。
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论