![](https://img-blog.csdnimg.cn/20200221151351873.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
mybatis
mybatis学习笔记
qq_187352634
这个作者很懒,什么都没留下…
展开
-
mybatis-SecondLevel-Cache
二级缓存的使用步骤:第一步:让Mybatis框架支持二级缓存(在SqlMapConfig.xml中配置)第二步:让当前的映射文件支持二级缓存(在IUserDao.xml中配置)第三步:让当前的操作支持二级缓存(在select标签中配置)mybatis-SecondLevel-Cache1.pom<?xml version="1.0" encoding="UTF-8"?>...原创 2020-02-24 17:43:19 · 90 阅读 · 0 评论 -
mybatis-account子类封装查询
AccuountUser类继承-account类封装查询1.pom<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ...原创 2020-02-24 17:39:27 · 124 阅读 · 0 评论 -
mybatis-查询-类成员封装-1对1
mybatis-查询-类成员封装-1对11.pom<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xs...原创 2020-02-24 17:38:35 · 229 阅读 · 0 评论 -
mybatis-用到的mysql语句
1.log4j.properties# Set root category priority to INFO and its only appender to CONSOLE.#log4j.rootCategory=INFO, CONSOLE debug info warn error fatallog4j.rootCategory=debug, CONSOLE...原创 2020-02-23 14:10:23 · 354 阅读 · 0 评论 -
mybatis入门
mybatis的入门mybatis的环境搭建第一步:创建maven工程并导入坐标第二步:创建实体类和dao的接口第三步:创建Mybatis的主配置文件SqlMapConifg.xml第四步:创建映射配置文件IUserDao.xml环境搭建的注意事项:第一个:创建IUserDao.xml 和 IUserDao.java时名称是为了和我们之前的知识保持一致。在Mybatis中它把持...原创 2020-02-21 15:57:43 · 66 阅读 · 0 评论 -
mybatis-introduction-annotation
mybatis-introduction-annotation1.pom<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"...原创 2020-02-21 15:56:00 · 184 阅读 · 0 评论 -
mybatis-introduce-有传统实现类
mybatis-introduce-有传统实现类1.pom<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ...原创 2020-02-21 15:53:45 · 108 阅读 · 0 评论 -
mybatis-pooled-commit
在 Mybatis 的 SqlMapConfig.xml 配置中,通过来实现 Mybatis 中连接池的配置, Mybatis 中的数据源 : 1.dataSourceUNPOOLED 不使用连接池的数据源 2.POOLED 使用连接池的数据源 3.JNDI 使用 JNDI 实现的数据源 session = factory.openSession(true);设为true便可自动提交...原创 2020-02-21 15:49:30 · 94 阅读 · 0 评论 -
mybatis-mysql-if-where
mybatis-mysql-if-where1.pom<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ...原创 2020-02-21 15:48:16 · 87 阅读 · 0 评论 -
mybatis-foreach-refid
mybatis-foreach-refid1.pom<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ...原创 2020-02-21 15:46:37 · 128 阅读 · 0 评论 -
mybatis-account子类封装查询
AccuountUser类继承-account类封装查询1.pom<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ...原创 2020-02-21 15:42:54 · 249 阅读 · 0 评论 -
mybatis-查询-类成员封装-1对1
mybatis-查询-类成员封装-1对11.pom<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" x...原创 2020-02-21 15:41:09 · 117 阅读 · 0 评论 -
mybatis-查询-1对多
mybatis-查询-1对多1.pom<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:sc...原创 2020-02-21 15:30:44 · 77 阅读 · 0 评论 -
mybatis-查询-多对多
mybatis-查询-多对多1.pom<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:sc...原创 2020-02-21 15:28:14 · 70 阅读 · 0 评论 -
mybatis-jndi
启动tomcat服务器,在index.jsp中代码使用datasource读取数据mybatis-jndi1.pom<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLS...原创 2020-02-21 15:26:38 · 327 阅读 · 0 评论 -
mybatis-SecondLevel-Cache-annotation
mybatis-SecondLevel-Cache-annotation1.pom<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-inst...原创 2020-02-21 14:25:33 · 111 阅读 · 0 评论 -
mybatis-annotation-1对多
mybatis-annotation-1对多1.pom<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ...原创 2020-02-21 14:04:37 · 83 阅读 · 0 评论 -
mybatis-annotation-1对1
account中根据uid对应查user信息,1对1mybatis-annotation-1对11.pom<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/X...原创 2020-02-21 13:10:12 · 95 阅读 · 1 评论 -
mybatis实体类与数据库字段映射
mybatis实体类与数据库字段映射1.pom<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi...原创 2020-02-21 12:15:54 · 2522 阅读 · 0 评论 -
mybatis-annotation-单表
在mybatis中针对CRUD一共有四个注解,@Select @Insert @Update @Deletemybatis-annotation-单表1.pom<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xs...原创 2020-02-21 09:58:33 · 156 阅读 · 0 评论 -
mybatis-SecondLevel-Cache
mybatis-SecondLevel-Cache1.pom<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ...原创 2020-02-21 09:49:03 · 126 阅读 · 0 评论 -
mybatis-FirstLevel-Cache
mybatis-FirstLevel-Cache1.pom<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ...原创 2020-02-21 09:46:10 · 113 阅读 · 0 评论 -
mybatis-1对多-lazy
mybatis-1对多-lazy1.pom<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:s...原创 2020-02-21 09:43:55 · 103 阅读 · 0 评论 -
mybatis-1对1-lazy
mybatis-1对1-lazy1.pom<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:s...原创 2020-02-20 19:28:45 · 82 阅读 · 0 评论