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. 蜕变·WebRebuild 2013 前端年度交流会邀请

    联网web前端设计行业通过一段时期的茧封或焰炼,web技术使行业.企业及自身发生质的改变.痛苦的蜕变是成长的契机,在彼此互相冲击.交流.融合的对话下,将以尊重包容互助合作同步发展的心态,对行业蜕变.自 ...

  2. SSH----MVC框架模式与分层架构

    MVC框架模式 MVC框架模式是web开发中一种软件设计典范,他的全名是(Model -View -Controller),是模型(model)--视图(view)--控制器(controller)的 ...

  3. Flappy Bird (Java实现)

    运行效果: 代码: package bird; import java.awt.Graphics; import java.awt.Image; import java.awt.Toolkit; im ...

  4. notepad++编译并运行java (自定义包)

    最近用Notepad++写汇编,感觉用起来挺顺手,于是想能不能也在这个优秀的编辑器下编写java并编译运行呢,因为每次启动eclipse都要挺长时间,而且eclipse实在太占内存了... 于是各种百 ...

  5. cookie 和 session 的基础知识

    cookie 和 session 的基础知识 cookie 和session 的区别详解 这些都是基础知识,不过有必要做深入了解.先简单介绍一下. 二者的定义: 当你在浏览网站的时候,WEB 服务器会 ...

  6. 更改项目名或者多个项目时,发现多个"Home"匹配的Controller时,解决方法

    [备份]异常信息:找到多个与名为“Home”的控制器匹配的类型.如果为此请求(“{controller}/{action}/{id}”)提供服务的 路由在搜索匹配此请求的控制器时没有指定命名空间,则会 ...

  7. 转:linux下安装或升级GCC4.8,以支持C++11标准

    转:http://www.cnblogs.com/lizhenghn/p/3550996.html C++11标准在2011年8月份获得一致通过,这是自1998年后C++语言第一次大修订,对C++语言 ...

  8. CodeSmith 使用说明

    〇.            前言 最近两天自己写了个简单的ORM框架,非常的Easy,但是没有相应的代码生成工具,于是就很杯具了! 于是乎,花费了一天的时间学习并写了一个CodeSmith可以使用的模 ...

  9. java多线程系类:基础篇:10生产者消费者的问题

    概要 本章,会对"生产/消费者问题"进行讨论.涉及到的内容包括:1. 生产/消费者模型2. 生产/消费者实现 转载请注明出处:http://www.cnblogs.com/skyw ...

  10. mysql新建用户的方法

    新增 insert into mysql.user(Host,User,Password,ssl_cipher,x509_issuer,x509_subject) values("local ...