<?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">
<!-- 通过这个配置文件完成mybatis与数据库的连接 -->
<configuration>
<!-- 引入 database.properties 文件-->
<properties resource="database.properties"/>
<settings>
<!-- 配置mybatis的log实现为LOG4J -->
<setting name="logImpl" value="LOG4J" />
<!--
设置resultMap的自动映射级别为:
NONE
PARTIAL(默认)
FULL
-->
<!-- <setting name="autoMappingBehavior" value="FULL" /> -->
<!-- <setting name="autoMappingBehavior" value="NONE" /> -->
</settings>
<!--类型别名-->
<typeAliases>
<!-- <typeAlias alias="User" type="cn.smbms.pojo.User"/> -->
<package name="cn.smbms.pojo"/>
</typeAliases>
<environments default="development">
<environment id="development">
<!--配置事务管理,采用JDBC的事务管理 -->
<transactionManager type="JDBC"></transactionManager>
<!-- POOLED:mybatis自带的数据源,JNDI:基于tomcat的数据源 -->
<dataSource type="POOLED">
<property name="driver" value="${driver}"/>
<property name="url" value="${url}"/>
<property name="username" value="${user}"/>
<property name="password" value="${password}"/>
</dataSource>
</environment>
</environments>
<!-- 将mapper文件加入到配置文件中 -->
<mappers>
<mapper resource="cn/smbms/dao/user/UserMapper.xml"/>
</mappers>
</configuration>