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. 【转载】SweetAlert2 使用

    SweetAlert2是一款功能强大的纯Js模态消息对话框插件.SweetAlert2用于替代浏览器默认的弹出对话框,它提供各种参数和方法,支持嵌入图片,背景,HTML标签等,并提供5种内置的情景类, ...

  2. POJ3463Sightseeing[次短路计数]

    Sightseeing Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 8707   Accepted: 3056 Descr ...

  3. 正弦 sin 余弦 cos

    正弦 以下概念需掌握 直角,锐角 sinA = 对边 / 斜边 性質 奇偶性 奇 定義域 (-∞,∞) 到達域 [-1,1] 周期 2π 在數學中,正弦是一種週期函數,是三角函数的一種.它的定义域是整 ...

  4. XML操作类

        using System; using System.Data; using System.IO; using System.Xml; namespace DotNet.Utilities { ...

  5. jQuery学习之jQuery Ajax用法详解

    jQuery Ajax在web应用开发中很常用,它主要包括有ajax,get,post,load,getscript等等这几种常用无刷新操作方法,下面我来给各位同学介绍介绍. 我们先从最简单的方法看起 ...

  6. HB制作的app版本更新

    wgt下载成功,安装的时候报wgt包中的manifest.json文件的version必须要大于当前版本,所以每次提交wgt资源包的时候一定要记得大于当前的版本号

  7. fMRI数据分析处理原理及方法

    来源: 整理文件的时候翻到的,来源已经找不到了囧感觉写得还是不错,贴在这里保存. 近年来,血氧水平依赖性磁共振脑功能成像(Blood oxygenation level-dependent funct ...

  8. VS2010/VS2013怎么复制项目/拷贝项目/克隆项目

    本文以vs2013为例,讲述了如何复制项目.vs2008,vs2010,vs2012等版本应操作类似 vs中的项目位于解决方案中,简单的复制粘贴是不能实现项目复制的 一.准备 原项目名称:test 目 ...

  9. MVC控制器总结

    1.特性 [AuthorizeFilter]  用于权限过滤 [HttpGet] [HttpPost] 2.参数 获取方法 public ActionResult void Get(int id){} ...

  10. .net core API 统一拦截错误

    public override void OnActionExecuted(ActionExecutedContext context) { if (context.Exception != null ...