![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mybatis
张润红
这个作者很懒,什么都没留下…
展开
-
mybatis之动态sql和分页
文章目录1、mybatis动态sql2、模糊查询3、查询返回结果集的处理4、分页查询5、特殊字符处理 1、mybatis动态sql 1.1 if 1.2 trim 1.3 foreach BookMapper.xml @Test public void selectByIn() { List list = new ArrayList(); list.add(...原创 2019-09-23 16:41:41 · 183 阅读 · 0 评论 -
mybatis与spring集成
文章目录1、spring整合mybatis1.添加相关依赖2.创建spring配置文件applicationContext2、测试3、aop整合pagehelper插件 1、spring整合mybatis 1.添加相关依赖 1.1 添加spring相关依赖(5.0.2.RELEASE) spring-core spring-beans spring-context spring-orm sprin...原创 2019-09-24 16:15:50 · 176 阅读 · 0 评论 -
Mybatis整合Redis实现二级缓存
文章目录1、mybatis整合ehcache作为缓存2、Mybatis集成redis 1、mybatis整合ehcache作为缓存 1.1、导入相关依赖 <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context-support</...原创 2019-09-25 21:29:22 · 273 阅读 · 0 评论 -
关联关系映射
文章目录1、mybatis的一对多关联关系2、mybatis的多对多的关联关系 1、mybatis的一对多关联关系 一对多 对应的实体类中是有对象的引用(应用的就是一个类) 重要是描述关联属性的配置 1.1 修改数据表* <table schema="" tableName="t_hibernate_order" domainObjectName="Order" ...原创 2019-09-28 11:55:23 · 246 阅读 · 0 评论