<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration
  PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
  "http://mybatis.org/dtd/mybatis-3-config.dtd">
<!-- 根标签 -->
<configuration>
<properties resource="db.properties"></properties>
<typeHandlers>
        <typeHandler handler="com.cesgroup.mybatiswork.handle.MyTypeHandle"></typeHandler>
    </typeHandlers>
   <!-- 环境，可以配置多个，default：指定采用哪个环境 -->
   <environments default="dev">
      <!-- id：唯一标识 -->
      <environment id="dev">
         <!-- 事务管理器，JDBC类型的事务管理器 -->
         <transactionManager type="JDBC" />
         <!-- 数据源，池类型的数据源 -->
         <dataSource type="POOLED">
            <property name="driver" value="${driver}" /> <!-- 配置了properties，所以可以直接引用 -->
            <property name="url" value="${url}" />
            <property name="username" value="${username}" />
            <property name="password" value="${password}" />
         </dataSource>
      </environment>
   </environments>
    <mappers>
     <mapper resource="MyMapper.xml" />
   </mappers>
  </configuration>