- 导入第三方缓存包
- 导入与第三方缓存整合的适配包;官方有https://github.com/mybatis/ehcache-cache/releases
- 编写ehcache.xml配置文件
- mapper.xml中使用自定义缓存
<cache type="org.mybatis.caches.ehcache.EhcacheCache"></cache>
参考:https://blog.csdn.net/jinhaijing/article/details/84255107
<cache type="org.mybatis.caches.ehcache.EhcacheCache"></cache>
参考:https://blog.csdn.net/jinhaijing/article/details/84255107