2015年12月2日

Mysql记录集锦

摘要: 1.mysql可以使用 explain 关键字来查询sql语句是否使用索引。 阅读全文

posted @ 2015-12-02 20:28 错误王 阅读(133) 评论(0) 推荐(0)

2013年11月3日

MyBeatis源码学习笔记(四)

摘要: SqlSessionFactory 作为MyBeatis的关键入口,业务尽量保持单一性,单纯地提供了openSession方法,用于获取Session。 getConfiguration()耦合了Configuration类,利用Configuration类保存所需要的所有的配置信息。 XMLConfigBuilder用于解析Xml,提供通过Reader,和InputStream两种方式转换... 阅读全文

posted @ 2013-11-03 22:22 错误王 阅读(708) 评论(0) 推荐(0)

2013年10月16日

MyBatis源码学习笔记(三)

摘要: 之前学习到 DefaultSqlSessionFactory中的 private SqlSession openSessionFromDataSource(ExecutorType execType, TransactionIsolationLevel level, boolean autoCommit) { Transaction tx = null; try { fina... 阅读全文

posted @ 2013-10-16 23:40 错误王 阅读(321) 评论(0) 推荐(0)

MyBatis源码学习笔记(二)

摘要: 参考文档中介绍Mybatis的中心是SqlSessionFactory.并举出一个简单的生成方法:String resource = “org/mybatis/example/mybatis-config.xml”;InputStream inputStream = Resources.getResourceAsStream(resource);SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().bulid(inputStream);文档列举的基本xml如下:configuration ... 阅读全文

posted @ 2013-10-16 00:00 错误王 阅读(563) 评论(0) 推荐(0)

2013年10月15日

MyBatis源码学习笔记(一)MyBatis源码下载

摘要: 之前就想学习一下开源代码,本来想从SSH框架开始学习,看了一下Hiberante的源码后,感觉学习起来比较吃力,所以打算先从MyBatis开始。一切从最简单开始,既是学习笔记,也是自己的学习记录,希望能通过记录的方式,让自己真的能完成整个学习的过程。mybatis网站下载mybatis最新的版本为3.2.3 下载地址:http://code.google.com/p/mybatis/downloads/detail?name=mybatis-3.2.3.zip解压后为mybatis的jar包,以及mybatis依赖的lib随后在http://repo1.maven.org/maven2/o.. 阅读全文

posted @ 2013-10-15 00:00 错误王 阅读(1005) 评论(0) 推荐(0)

导航