Springboot工程Mybatis二级缓存配置
2021-04-14 18:29
阅读:499
标签:ons bsp color ase 对象 style location span nbsp
1、在application.yml配置cache-enabled: true
mybatis: config-location: classpath:/mybatis-config.xml, classpath:mybatis/mybatis-config.xml mapper-locations: classpath:mappers/*.xml,classpath:mybatis/mapper/*.xml configuration: cache-enabled: true
2、在xxxMapper.xml添加
a)b) select id="selectBygoodsCataCodeAndprovinceCode" resultMap="BaseResultMap" useCache="true" >
3)实体对象要implements Serializable,否则报错
public class CompleteTime implements Serializable
4、启动工程,如果出现
Cache Hit Ratio . #表示缓存开启了.....
Springboot工程Mybatis二级缓存配置
标签:ons bsp color ase 对象 style location span nbsp
原文地址:https://www.cnblogs.com/ywjfx/p/13336460.html
下一篇:jupyter渲染网页的3种方式
文章来自:搜素材网的编程语言模块,转载请注明文章出处。
文章标题:Springboot工程Mybatis二级缓存配置
文章链接:http://soscw.com/index.php/essay/75777.html
文章标题:Springboot工程Mybatis二级缓存配置
文章链接:http://soscw.com/index.php/essay/75777.html
评论
亲,登录后才可以留言!