随笔分类 -  mybatis

摘要:reference:https://developer.aliyun.com/article/55694 简介: 问题回顾 最近项目功能单元测试中,出现了一个奇怪的bug。远程调试发现,程序进行了2次相同的查询,返回了实体类(ClassA)的2个对象:classAInstance1和classAIn 阅读全文
posted @ 2021-02-19 17:49 marxtsui 阅读(316) 评论(0) 推荐(0)
摘要:mybatis 缓存失效和坑 mybatis 缓存类型 local cache,也就是所谓的局部缓存。由以下参数控制: localCacheScope 文档 cache,也就是所谓的二级缓存。由以下参数控制: cacheEnabled cache cache-ref useCache flushCa 阅读全文
posted @ 2021-02-19 17:48 marxtsui 阅读(1021) 评论(0) 推荐(0)
摘要:reference:https://www.cnblogs.com/shuchen007/p/9193190.html 频繁的数据库操作是非常耗费性能的(主要是因为对于DB而言,数据是持久化在磁盘中的,因此查询操作需要通过IO,IO操作速度相比内存操作速度慢了好几个量级),尤其是对于一些相同的查询语 阅读全文
posted @ 2021-02-19 17:46 marxtsui 阅读(296) 评论(0) 推荐(0)
摘要:在Mybatis中,我们通常会像下边这样用: 返回一个结果 User selectOne(User user); <select id="selectOne" parameterType="cn.lyn4ever.entity.User" resultType="cn.lyn4ever.entity 阅读全文
posted @ 2020-11-26 09:05 marxtsui 阅读(741) 评论(0) 推荐(0)