第一步:让Mybatis框架支持二级缓存(在SqlMapConfig. xml中配置)
<settings>
<setting name="cacheEnabled" value="true"/>
</settings>
第二步:让当前的映射文件支持二级缓存(在***Dao. xml中配置)
<cache/>
第三步:让当前的操作支持二级缓存(在select标签中配置)
useCache= "true"

image.png
第一步:让Mybatis框架支持二级缓存(在SqlMapConfig. xml中配置)
<settings>
<setting name="cacheEnabled" value="true"/>
</settings>
第二步:让当前的映射文件支持二级缓存(在***Dao. xml中配置)
<cache/>
第三步:让当前的操作支持二级缓存(在select标签中配置)
useCache= "true"