mybatis 的源代码地址是https://github.com/mybatis/mybatis-3/ 以及相关文档

All the information i get from http://www.mybatis.org/mybatis-3/index.html

MyBatis SQL Mapper Framework for Java

The MyBatis SQL mapper framework makes it easier to use a relational database with object-oriented applications.

MyBatis couples objects with stored procedures or SQL statements using a XML descriptor or annotations.

Simplicity is the biggest advantage of the MyBatis data mapper over object relational mapping tools.

4 important Object

1. SqlSessionFactoryBuilder

2. SqlSessionFactory

Once created, the SqlSessionFactory should exist for the duration of your application execution.

the best scope of SqlSessionFactory is application scope

3. SqlSession

Each thread should have its own instance of SqlSession

Instances of SqlSession are not to be shared and are not thread safe. Therefore the best scope is request or method scope

Upon receiving an HTTP request, you can open a SqlSession, then upon returning the response, you can close it

4. Mapper Instance

Mappers are interfaces that you create to bind to your mapped statements

mybatis学习(一) mybatis框架的特性的更多相关文章

  1. MyBatis学习总结-MyBatis快速入门的系列教程

    MyBatis学习总结-MyBatis快速入门的系列教程 [MyBatis]MyBatis 使用教程 [MyBatis]MyBatis XML配置 [MyBatis]MyBatis XML映射文件 [ ...

  2. MyBatis学习(三)---MyBatis和Spring整合

    想要了解MyBatis基础的朋友可以通过传送门: MyBatis学习(一)---配置文件,Mapper接口和动态SQL http://www.cnblogs.com/ghq120/p/8322302. ...

  3. mybatis学习:mybatis的环境搭建与入门

    一.mybatis的概述: mybatis是一个持久层框架,用java编写 它封装了jdbc操作的很多细节,使开发者只需要关注sql语句本身,而无需关注注册驱动,创建连接登繁杂过程 它使用了ORM思想 ...

  4. Mybatis学习笔记-Mybatis简介

    如何获得Mybatis 中文文档 https://github.com/tuguangquan/mybatis Github https://github.com/mybatis/mybatis-3 ...

  5. mybatis学习:mybatis的注解开发和编写dao实现类的方式入门

    一.使用注解则不需要创建映射配置文件:即xxxDao.xml javaBean为什么要实现Serializable接口? Java的"对象序列化"能让你将一个实现了Serializ ...

  6. Mybatis学习——初始MyBatis

    什么是MyBatis框架? MyBatis框架是一种ORM(既对象关系映射)框架. 什么是ORM框架? 是一种为了解决面向对象与关系数据库之间数据不匹配的技术,它通过描述Java对象和关系数据库表之间 ...

  7. mybatis学习四 mybatis的三种查询方式

    <select id="selAll" resultType="com.caopeng.pojo.Flower"> select * from fl ...

  8. Mybatis学习总结--------Mybatis <where>标签 (九)

      <select id="findActiveBlogLike" resultType="Blog"> SELECT * FROM BLOG WH ...

  9. mybatis 学习六 MyBatis主配置文件

    在定义sqlSessionFactory时需要指定MyBatis主配置文件: <bean id="sqlSessionFactory" class="org.myb ...

  10. mybatis 学习二 MyBatis简介与配置MyBatis+Spring+MySql

    1.2.2建立MySql数据库 在C:\Program Files\MySQL\MySQL Server 5.7\bin下面: 首先连接MySQL:        mysql  -u root -p ...

随机推荐

  1. Caffe源码解析1:Blob

    转载请注明出处,楼燚(yì)航的blog,http://www.cnblogs.com/louyihang-loves-baiyan/ 首先看到的是Blob这个类,Blob是作为Caffe中数据流通的 ...

  2. 自学一个月的java了

    不知道这篇博文有不有朋友看到.先自我介绍一下,硕士一年级下学期. 对编程感兴趣,硕士一年级下学期转学计算机专业,目前刚好一个月的时间.接触计算机也是刚好一个月的时间. 学习了java,javaweb. ...

  3. UART to Serial Terminal(转载)

    前一篇<UART Explained>介绍了UART的基本信息,重点分析了UART的信号.本文摘录的文章则重点介绍了波特率(Baud Rate)相关的内容,波特率越高,传输速度越快,但实际 ...

  4. jsp考试的错题

    (选择一项) A: B: C: D: 正确答案是 A,首先,session的出现确实是为了解决HTTP无法保持客户状态的特点:因此A选项正确:用户信息也是客户状态的一部分,所以由A可以看出B的说法就不 ...

  5. SVN的使用方法

    SVN的使用方法: 新建文件夹:文件夹1 在文件夹上点击右键--选择 SVN Checkout--弹出checkout窗口 下载文件的url获取:打开SVN--在要下载的文件上点击右键--点击Copy ...

  6. js正则验证邮箱、手机号、年龄

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  7. 5.Transact-SQL编程

    转载于:http://www.cnblogs.com/hoojo/archive/2011/07/19/2110862.html Transact-SQL中的存储过程,非常类似于Java语言中的方法, ...

  8. asp.net core 日志

    日志输出是应用程序必不可少的部分,log4net,nlog这些成熟的组件在之前的项目中被广泛使用,在asp.net core的项目中没有找到与之对应的log4net版本,nlog对core提供了很好的 ...

  9. php常见问题以及解决方法

    在使用php的过程中,经常会出现一些问题,下面是我遇到的一些问题以及解决方法 1,乱码问题,中文乱码问题 原因是:编码方式不一样,有UTF-8,gbk-2312等编码方式,不同的编码方式导致浏览器在解 ...

  10. [转]❲阮一峰❳Linux 守护进程的启动方法

    ❲阮一峰❳Linux 守护进程的启动方法 "守护进程"(daemon)就是一直在后台运行的进程(daemon). 本文介绍如何将一个 Web 应用,启动为守护进程. 一.问题的由来 ...