MyBatis最关键的组成部分是SqlSessionFactory,我们可以从中获取SqlSession,并执行映射的SQL语句.SqlSessionFactory对象可以通过基于XML的配置信息或者Java API 创建. 我们将探索各种MaBatis配置元素,如dataSource,environments,全局参数设置,typeAlias,typeHandlers,SQL映射:接着我们将实例化SqlSessionFactory. 本章将涵盖一下内容: l 使用 XML配置MyBatis…
第二章.Connection management连接管理2.1. 2.1.Connection persistence连接持久性The process of establishing a connection from one host to another is quite complex and involves multiple packet exchanges between two endpoints, which can be quite time consuming. 建立连接的…