- 導入第三方緩存包
- 導入與第三方緩存整合的適配包;官方有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