今天总结的是mybatis,首先说mybatis是什么?

MyBatis 是一个简化和实现了 Java 数据持久化层(persistence layer)的开源框架,它抽象了大量的 JDBC 冗余代 码,并提供了一个简单易用的 API 和数据库交互。 MyBatis 的前身是 iBATIS,iBATIS 于 2002 年由 Clinton Begin 创建。MyBatis 3 是 iBATIS 的全新设计,支持 注解和 Mapper。

而 MyBatis 流行起来有以下原因:

 它消除了大量的 JDBC 冗余代码

 它有低的学习曲线

 它能很好地与传统数据库协同工作

 它可以接受 SQL 语句

 它提供了与 Spring 和 Guice 框架的集成支持

 它提供了与第三方缓存类库的集成支持

 它引入了更好的性能

下面介绍一个mybatis的小例子:

使用 MyBatis 开发一个简单的 Java 项目:大致步骤如下

 新建表 STUDENTS,插入样本数据

 新建一个 Java 项目,将 MyBatis-3.2.2.jar 添加到 classpath 中

 新建建 MyBatisSqlSessionFactory 单例模式类

 新建映射器 StudentMapper 接口和 StudentService 类

 新建一个 JUnit 测试类来测试 StudentService

①我使用的是mysql,首先新建一个数据库mybatis1,再新建表STUDENTS

CREATE TABLE STUDENTS
(
stud_id int(11) NOT NULL AUTO_INCREMENT,
name varchar(50) NOT NULL,
email varchar(50) NOT NULL,
dob date DEFAULT NULL,
PRIMARY KEY (stud_id)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
/*Sample Data for the students table */
insert into students(stud_id,name,email,dob)
values (1,'Student1','student1@gmail.com','1983-06-25');
insert into students(stud_id,name,email,dob)
values (2,'Student2','student2@gmail.com','1983-06-25');

②我新建的是maven项目,导入jar包在pom.xml中进行了配置

 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.bai</groupId>
<artifactId>bai</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>bai Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency> <dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.2.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.22</version>
<scope>runtime</scope>
</dependency> <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.5</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<finalName>bai</finalName>
</build>
</project>

③ 新建 log4j.properties 文件,添加到 classpath 中.

log4j.rootLogger=DEBUG, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d [%-5p] %c - %m%n

④ 创建 MyBatis 的主要配置文件 mybatis-config.xml,其中包括数据库连接信息,类型别名等等,然后将其加 到 classpath 中;

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<typeAliases>
<typeAlias alias="Student" type="com.mybatis3.domain.Student" />
</typeAliases>
<environments default="development">
<environment id="development">
<transactionManager type="JDBC" />
<dataSource type="POOLED">
<property name="driver" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost:3306/mybatis1" />
<property name="username" value="root" />
<property name="password" value="" />
</dataSource>
</environment>
</environments>
<mappers>
<mapper resource="com/mybatis3/mappers/StudentMapper.xml" />
</mappers>
</configuration>

⑤创建 SQL 映射器 XML 配置文件 StudentMapper.xml 并且将它放在 com.mybatis3.mappers 包中,注意这个包要在resource下面,如果在main下面的话,会遇到读取不到这个配置文件的问题

 <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.mybatis3.mappers.StudentMapper">
<resultMap type="Student" id="StudentResult">
<id property="studId" column="stud_id" />
<result property="name" column="name" />
<result property="email" column="email" />
<result property="dob" column="dob" />
</resultMap>
<select id="findAllStudents" resultMap="StudentResult">
SELECT * FROM STUDENTS
</select>
<select id="findStudentById" parameterType="int" resultType="Student">
SELECT STUD_ID AS STUDID, NAME, EMAIL, DOB
FROM STUDENTS WHERE STUD_ID=#{Id}
</select>
<insert id="insertStudent" parameterType="Student">
INSERT INTO STUDENTS(STUD_ID,NAME,EMAIL,DOB)
VALUES(#{studId },#{name},#{email},#{dob})
</insert>
</mapper>

⑥ 新建 MyBatisSqlSessionFactory 单例类

 package com.mybatis3.util;

 import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder; import java.io.*;
import java.io.IOException;
import java.io.InputStream; /**
* Created by peng on 2016/8/4.
*/
public class MyBatisSqlSessionFactory {
private static SqlSessionFactory sqlSessionFactory;
public static SqlSessionFactory getSqlSessionFactory(){
if(sqlSessionFactory==null){
InputStream inputStream;
try {
inputStream = Resources.getResourceAsStream("mybatis-config.xml");
sqlSessionFactory = new SqlSessionFactoryBuilder().build(inputStream);
}
catch(IOException e){
System.out.println("aaa");
System.out.println(e.getMessage());
throw new RuntimeException(e.getCause());
}
}
return sqlSessionFactory;
}
public static SqlSession openSession(){
return getSqlSessionFactory().openSession();
}
}

上述的代码段中,我们创建了一个 SqlSessionFactory 对象,我们将使用它来获得 SqlSession 对象和执行映射的SQL 语句。

⑦ 新建 StudentMapper 接口和 StudentService 类

1. 首先, 创建 JavaBean Student.java

 package com.mybatis3.domain;

 import java.util.Date;

 /**
* Created by peng on 2016/8/4.
*/
public class Student {
private Integer studId;
private String name;
private String email;
private Date dob;
public String getName() {
return name;
} public Integer getStudId() {
return studId;
} public String getEmail() {
return email;
} public Date getDob() {
return dob;
} public void setStudId(Integer studId) {
this.studId = studId;
} public void setName(String name) {
this.name = name;
} public void setEmail(String email) {
this.email = email;
} public void setDob(Date dob) {
this.dob = dob;
} }

2. 创建映射器 Mapper 接口 StudentMapper.java 其方法签名和 StudentMapper.xml 中定义的 SQL 映射定义名 相同

 package com.mybatis3.mappers;

 import com.mybatis3.domain.Student;

 import java.util.List;

 /**
* Created by peng on 2016/8/4.
*/
public interface StudentMapper {
List<Student>findAllStudents();
Student findStudentById(Integer id);
void insertStudent(Student student); }

3. 现在创建 StudentService.java 实现对表 STUDENTS 的数据库操

 package com.mybatis3.services;

 import com.mybatis3.domain.Student;
import com.mybatis3.mappers.StudentMapper;
import com.mybatis3.util.MyBatisSqlSessionFactory;
import org.apache.ibatis.session.SqlSession;
import org.slf4j.LoggerFactory; import java.util.List; /**
* Created by peng on 2016/8/4.
*/
public class StudentService {
private org.slf4j.Logger logger= LoggerFactory.getLogger(getClass());
public List<Student>findAllStudents()
{
SqlSession sqlSession= MyBatisSqlSessionFactory.openSession();
try {
StudentMapper studentMapper = sqlSession.getMapper(StudentMapper.class);
return studentMapper.findAllStudents();
}
finally {
sqlSession.close();
}
}
public Student findStudentById(Integer studId)
{
logger.debug("Select Student By ID:{}",studId);
SqlSession sqlSession=MyBatisSqlSessionFactory.openSession();
try{
StudentMapper studentMapper=sqlSession.getMapper(StudentMapper.class);
return studentMapper.findStudentById(studId);
}
finally {
sqlSession.close();
}
}
public void createStudent(Student student)
{
SqlSession sqlSession=MyBatisSqlSessionFactory.openSession();
try{
StudentMapper studentMapper=sqlSession.getMapper(StudentMapper.class);
studentMapper.insertStudent(student);
sqlSession.commit();
}
finally {
sqlSession.close();
}
}
}

⑨ 新建一个 JUnit 测试类来测试 StudentService

 package com.mybatis3.services;

 import com.mybatis3.domain.Student;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test; import java.util.Date;
import java.util.List; /**
* Created by peng on 2016/8/4.
*/
public class StudentServiceTest {
private static StudentService studentService;
@BeforeClass
public static void setup(){
studentService=new StudentService();
}
@AfterClass
public static void teardown(){
studentService=null;
}
@Test
public void testFindAllStudents()
{
List<Student>students=studentService.findAllStudents();
Assert.assertNotNull(students);
for(Student student:students)
{
System.out.println(student);
}
}
@Test
public void testFindStudentById()
{
Student student=studentService.findStudentById(1);
Assert.assertNotNull(student);
System.out.println(student);
}
@Test
public void testCCeateStudent()
{
Student student=new Student();
int id=3;
student.setStudId(id);
student.setName("student_"+id);
student.setEmail("student_"+id+"gmail.com");
student.setDob(new Date());
studentService.createStudent(student);
Student newStudent=studentService.findStudentById(id);
Assert.assertNotNull(newStudent);
}
}

⑩ 它是怎么工作的
首先,我们配置了 MyBatis 最主要的配置文件-mybatis-config.xml,里面包含了 JDBC 连接参数;配置了映射器 Mapper XML 配置文件文件,里面包含了 SQL 语句的映射。  
我们使用 mybatis-config.xml 内的信息创建了 SqlSessionFactory 对象。每个数据库环境应该就一个 SqlSessionFactory 对象实例,所以我们使用了单例模式只创建一个 SqlSessionFactory 实例。  
我们创建了一个映射器 Mapper 接口-StudentMapper,其定义的方法签名和在 StudentMapper.xml 中定义的完全 一样(即映射器 Mapper 接口中的方法名跟 StudentMapper.xml 中的 id 的值相同)。注意 StudentMapper.xml 中 namespace 的值被设置成 com.mybatis3.mappers.StudentMapper,是 StudentMapper 接口的完全限定名。这使我们 可以使用接口来调用映射的 SQL 语句。  
在 StudentService.java 中,我们在每一个方法中创建了一个新的 SqlSession,并在方法功能完成后关闭 SqlSession。每一个线程应该有它自己的 SqlSession 实例。SqlSession 对象实例不是线程安全的,并且不被共享。所 以 SqlSession 的作用域最好就是其所在方法的作用域。从 Web 应用程序角度上看,SqlSession 应该存在于 request 级 别作用域上。

注意:

在看书学习的时候,遇到了几个概念性的问题:

classpath概念:设置Classpath的目的,在于告诉Java执行环境,在哪些目录下可以找到您所要执行的Java程序所需要的类或者包Java执行环境本身就是一个平台,执行于这个平台上的程序是已编译完成的Java程序(后面会介绍到Java程序编译完成之后,会以.class文件存在)。如果将Java执行环境比喻为操作系统,如果设置Path变量是为了让操作系统找到指定的工具程序(以Windows来说就是找到.exe文件),则设置Classpath的目的就是让Java执行环境找到指定的Java程序(也就是.class文件)。

本书中有时候提到新建了某文件加入到classpath中,放到webapp下面的WEB-INF下面即可。

resource想新建package却新建不了?

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAqsAAAD7CAIAAADCaEp4AAAgAElEQVR4nO2d729c1Z3/5yn9A/bZPkFov0+gKyQvyaBdKfoqQjxaUm1ZFa2FlmZ31Kz01SgKkG5JoabbH/56mdACS9wESNKYmDbjmHWYQGKCY1zTyEmAuJBkGkyqrDMDW/DYSxpP4snsg3PvuefcX3Pnzu97Xy+9FY2Pz7nn3HFmPu/zOWfmJKo6J0+eLAIAAEDUSeAAAAAAYggOAAAAII7gAAAAAOIIDgAAACCO4AAAAADiCA4AAAAgjuAAAAAA4ggOAAAAII7gAAAAAOIIDgAAACCO4AAAAADiCA4AAAAgjuAAAAAA4ggOAAAAII7gAAAAAOIIDgDazcWLF3fu3Lk1lgwNDV28eLHTfwEAgGIRBwDtZ+fOnbt27dofS4aHh3fs2NHpvwAAQLGIA4D2s3Xr1k4H4k6ydevWTv8FAACKRRwAtB8cQKf/AgAAxSIOANoPDqDTfwEAgGIRBwDtBwfQ6b8AAECxGHMHsPXgezYdeu98pwfVHNKvP2rTr0+PdXpQBjYH8PZ/fNumw3ue7lB0bgeuDsD5JJx7Z6T9f5ro8but/2zTwqFXOz0ogG6hYw6gUJgd6Ev0jxTa050rTgcQGRPgdADdYwJqOoBom4CADgAT0BScDqB1JqBQGOlP9I8UAr2nFUb6E30Dsy2oDBCcuh2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HAAABAjcAAISeEAACBG4AAQksIBAECMwAEgJIUDAIAYEc4BiKPz1GMAm6iWXhwhH+EAACBG4AAQksIBAECMCOcArCN2HAcCichtRvFcTj8R2Dhwbzglj89RD+yRpw7Ki3c8JKBYCQcAADGi8RzA0mp+ZrsZzidT5lnA+ul/q7ncXZo5UGyBef6eeU1yAKhTwgEAQIxo1iqAOCPYOjxXr7A0mVLPzJU/qofqKmkAHADqjHAAABAjmpADuJAZvSsxOpw3H9fnANRy58URaqdwAAAQI5rgAJQo/ofhpHsOwG8VwKo2v92lLUJtEw4AAGJE6O8DEGn/XQ9mLl/Pzzxo5vC3p1xzAKWytVvQvhPQsYtQvXjHQwKKlXAAABAjOvKNQK7Jfy+dOnWKf/m3Pf/iAAAgRrTHASyt5mce1D4XIPYNINRVwgEAQIxoWw5AzfYT/lF3CgcAADGCcwEQksIBAECMwAEgJIUDAIAYgQNASAoHAAAxAgeAkBQOAABiBA4AISkcAADECBwAQlI4AACIETgAhKRwAAAQI3AACEnhAAAgRuAAEJLCAQBAjMABICSFAwCAGIEDQEjqfwGWBHGy4RsAugAAAABJRU5ErkJggg==" alt="" />

这两个文件夹的类型都是Sources的时候才能新建package,由于博主学习maven有限,原理不太明白,有懂的读者欢迎指明。

最后运行了测试类,运行成功。

mybatis学习(一)一个在idea下的实例的更多相关文章

  1. mybatis学习笔记(六) -- maven+spring+mybatis从零开始搭建整合详细过程(下)

    继续 mybatis学习笔记(五) -- maven+spring+mybatis从零开始搭建整合详细过程(上) 五.使用监听器启动Spring容器 1.修改pom.xml文件,添加Spring-we ...

  2. mybatis学习笔记(14)-查询缓存之中的一个级缓存

    mybatis学习笔记(14)-查询缓存之中的一个级缓存 标签: mybatis mybatis学习笔记14-查询缓存之中的一个级缓存 查询缓存 一级缓存 一级缓存工作原理 一级缓存測试 一级缓存应用 ...

  3. MyBatis学习总结(二)——使用MyBatis对表执行CRUD操作(转载)

    本文转载自:http://www.cnblogs.com/jpf-java/p/6013540.html 上一篇博文MyBatis学习总结(一)--MyBatis快速入门中我们讲了如何使用Mybati ...

  4. MyBatis学习总结(八)——Mybatis3.x与Spring4.x整合(转载)

      孤傲苍狼 只为成功找方法,不为失败找借口! MyBatis学习总结(八)--Mybatis3.x与Spring4.x整合 一.搭建开发环境 1.1.使用Maven创建Web项目 执行如下命令: m ...

  5. MyBatis学习总结(七)——Mybatis缓存(转载)

      孤傲苍狼 只为成功找方法,不为失败找借口! MyBatis学习总结(七)--Mybatis缓存 一.MyBatis缓存介绍 正如大多数持久层框架一样,MyBatis 同样提供了一级缓存和二级缓存的 ...

  6. (原创)mybatis学习一,夯实基础

    一,what?(是什么) MyBatis是一个支持普通SQL查询,存储过程和高级映射的优秀持久层框架.MyBatis消除了几乎所有的JDBC代码和参数的手工设置以及对结果集的检索封装.MyBatis可 ...

  7. MyBatis学习--简单的增删改查

    jdbc程序 在学习MyBatis的时候先简单了解下JDBC编程的方式,我们以一个简单的查询为例,使用JDBC编程,如下: Public static void main(String[] args) ...

  8. MyBatis学习总结(二)——使用MyBatis对表执行CRUD操作

    上一篇博文MyBatis学习总结(一)——MyBatis快速入门中我们讲了如何使用Mybatis查询users表中的数据,算是对MyBatis有一个初步的入门了,今天讲解一下如何使用MyBatis对u ...

  9. 【Todo】Mybatis学习-偏理论

    之前写过好几篇Mybatis相关的文章: http://www.cnblogs.com/charlesblc/p/5906431.html  <SSM(SpringMVC+Spring+Myba ...

随机推荐

  1. RecyclerView全面解析

    写在前面 起深入浅出这名字的时候我是慎重又慎重的,生怕被人骂标题党,写的什么破玩意还敢说深入浅出.所以还是请大家不要抱着太高的期望,因为没有期望就没有失望,就像陈润说的,超预期嘛.全当看小说的心情来看 ...

  2. HDU 1718 Rank counting sort解法

    本题是利用counting sort的思想去解题. 注意本题,好像利用直接排序,然后查找rank是会直接被判WA的.奇怪的推断系统. 由于分数值的范围是0到100,很小,而student 号码又很大, ...

  3. [置顶] 最小生成树Prim算法

    二话不说直接贴代码 原图传送门:http://www.tyut.edu.cn/kecheng1/site01/suanfayanshi/minispantree.asp 但是上面展现的是克鲁斯卡尔算法 ...

  4. Unity3d 网络编程(一)(Unity3d内建网络Network介绍)

    首先个人说说题外话,Unity3d使用的网络库核心是用C++实现的一款商业网络游戏引擎库. RakNet.所以对于移动设备来说,用Unity3d来写server是全然能够的,而且内建网络库的各项功能封 ...

  5. glog摘记

    projcet url:https://code.google.com/p/google-glog/ usage: application-level logging setting flags GL ...

  6. IOS debug网络PonyDebugger 实践篇

    引言:  PonyDebugger是一个很给力的iOS调试工具,它的监视器安装在Chrome浏览器下做为插件使用,通过监视器和PonyDebugger的iOS SDK相辅相成,可以很好的监视App的运 ...

  7. javascript---遇到关于this的相关问题(解决this)(持续更新中...)

    1.在原型中使用this <!doctype html> <html lang="en"> <head> <meta charset=&q ...

  8. linux僵死进程的产生与避免

      作者:lingdxuyan来源:ChinaUnix技术博客,本文版权由lingdxuyan所有,如需转载,请注明出处. 一个进程在调用exit命令结束自己的生命的时候,其实它并没有真正的被销毁, ...

  9. 句柄(Handle)

    1.句柄是什么?    在windows中,句柄是和对象一一对应的32位无符号整数值.对象可以映射到唯一的句柄,句柄也可以映射到唯一的对象.2.为什么我们需要句柄?     更准确地说,是window ...

  10. PAT 1010

    1010. Radix (25) Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 11 ...