mybatis学习(一) mybatis框架的特性
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框架的特性的更多相关文章
- MyBatis学习总结-MyBatis快速入门的系列教程
MyBatis学习总结-MyBatis快速入门的系列教程 [MyBatis]MyBatis 使用教程 [MyBatis]MyBatis XML配置 [MyBatis]MyBatis XML映射文件 [ ...
- MyBatis学习(三)---MyBatis和Spring整合
想要了解MyBatis基础的朋友可以通过传送门: MyBatis学习(一)---配置文件,Mapper接口和动态SQL http://www.cnblogs.com/ghq120/p/8322302. ...
- mybatis学习:mybatis的环境搭建与入门
一.mybatis的概述: mybatis是一个持久层框架,用java编写 它封装了jdbc操作的很多细节,使开发者只需要关注sql语句本身,而无需关注注册驱动,创建连接登繁杂过程 它使用了ORM思想 ...
- Mybatis学习笔记-Mybatis简介
如何获得Mybatis 中文文档 https://github.com/tuguangquan/mybatis Github https://github.com/mybatis/mybatis-3 ...
- mybatis学习:mybatis的注解开发和编写dao实现类的方式入门
一.使用注解则不需要创建映射配置文件:即xxxDao.xml javaBean为什么要实现Serializable接口? Java的"对象序列化"能让你将一个实现了Serializ ...
- Mybatis学习——初始MyBatis
什么是MyBatis框架? MyBatis框架是一种ORM(既对象关系映射)框架. 什么是ORM框架? 是一种为了解决面向对象与关系数据库之间数据不匹配的技术,它通过描述Java对象和关系数据库表之间 ...
- mybatis学习四 mybatis的三种查询方式
<select id="selAll" resultType="com.caopeng.pojo.Flower"> select * from fl ...
- Mybatis学习总结--------Mybatis <where>标签 (九)
<select id="findActiveBlogLike" resultType="Blog"> SELECT * FROM BLOG WH ...
- mybatis 学习六 MyBatis主配置文件
在定义sqlSessionFactory时需要指定MyBatis主配置文件: <bean id="sqlSessionFactory" class="org.myb ...
- mybatis 学习二 MyBatis简介与配置MyBatis+Spring+MySql
1.2.2建立MySql数据库 在C:\Program Files\MySQL\MySQL Server 5.7\bin下面: 首先连接MySQL: mysql -u root -p ...
随机推荐
- [Notes] Learn Python2.7 From Python Tutorial
I have planed to learn Python for many times. I have started to learn Python for many times . Howeve ...
- python读取excel并制表输出
源码如下: #!/usr/bin/python #coding=UTF-8 import xlrd import sys from texttable import Texttable def she ...
- UVA 11817 Tunnelling the Earth --球面距离公式
题意: 给出两点的经纬度,求两点的球面距离与直线距离之差. 解法: 我们先算出球面距离,然后可以根据球面距离算出直线距离. 球面距离公式: R*acos(sin(W1)*sin(W2)+cos(W1) ...
- Java的cmd配置(也即Java的JDK配置及相关常用命令)——找不到或无法加载主类 的解决方法
Java的cmd配置(也即Java的JDK配置及相关常用命令) ——找不到或无法加载主类 的解决方法 这段时间一直纠结于cmd下Java无法编译运行的问题.主要问题描述如下: javac 命令可以正 ...
- BeJavaGod - 如何正确使用数据字典进行分类统一操作(一)
先说说什么是数据字典,这个玩意一般不太会解释,举个栗子吧~ 每个系统都会有用户表,性别:男(1)女(0) 另外我们做物流的会涉及到车型:卡车(1),轿车(2),挂车(3) 货物类型:危险品(1),普通 ...
- POJ1742 Coins[多重背包可行性]
Coins Time Limit: 3000MS Memory Limit: 30000K Total Submissions: 34814 Accepted: 11828 Descripti ...
- AC日记——统计数字字符个数 openjudge 1.7 01
01:统计数字字符个数 总时间限制: 1000ms 内存限制: 65536kB 描述 输入一行字符,统计出其中数字字符的个数. 输入 一行字符串,总长度不超过255. 输出 输出为1行,输出字符串 ...
- python黑客编程之端口爆破
#coding:utf-8 from optparse import OptionParser import time,re,sys,threading,Queue import ftplib,soc ...
- Java 8特性探究(1):通往lambda之路与 lambda表达式10个示例
本文由 ImportNew 函数式接口 函数式接口(functional interface 也叫功能性接口,其实是同一个东西).简单来说,函数式接口是只包含一个方法的接口.比如Java标准库中的ja ...
- [资料]自动化e2e测试 -- WebDriverJS,Jasmine和Protractor
1. http://sentsin.com/web/658.html 2. http://www.tuicool.com/articles/AnE3Mb 3. http://www.doc88.com ...