mybatis使用ehchache代替二级缓存

  1. ehchache依赖slf4j,所以先要设置slf4j
  2. 引入mybatis-ehcache.jar和echache-core.jar
  3. 在echache-core.jar包下找到ehcache-failsafe.xml文件,改名为ehcache.xml放入项目src目录下,注意在ehcache标签中加入updateCheck=“false”

你可能感兴趣的:(ehcache)