<?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>
<environments default="mysql_test">
<environment id="mysql_test">
//事务驱动
<transactionManager type="JDBC"></transactionManager>
//配置数据源
<dataSource type="pooled">
//驱动
<property name="driver" value="com.mysql.jdbc.Driver"/>
//数据库连接
<property name="password" value="123"/> // 123 : MySQL登陆密码
</dataSource>
</environment>
</environments>
//加载配置文件
<mappers>
<mapper resource="com/bw/mapper/userMapper.xml"/>
</mappers>
</configuration>
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<environments default="mysql_test">
<environment id="mysql_test">
//事务驱动
<transactionManager type="JDBC"></transactionManager>
//配置数据源
<dataSource type="pooled">
//驱动
//数据库连接
<property name="url" value="jdbc:mysql://localhost:3306/test"/> // test : MySQL数据库名称
localhost:3306 : MySQL端口号
<property name="password" value="123"/> // 123 : MySQL登陆密码
</dataSource>
</environment>
</environments>
//加载配置文件
<mappers>
<mapper resource="com/bw/mapper/userMapper.xml"/>
</mappers>
</configuration>