<?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 标签里用于配置数据库连接信息-->
<environments default="mysql">
<environment id="mysql">
<!-- transactionManager用于配置数据库管理方式-->
<transactionManager type="JDBC"></transactionManager>
<!-- dataSource用于配置数据库连接信息 -->
<dataSource type="POOLED">
<property name="driver"
value="com.mysql.jdbc.Driver"/>
<property name="url"
value="jdbc:mysql://localhost:3306/db_mtl?characterEncoding=utf8"/>
<property name="username" value="root"/>
<property name="password" value="gph"/>
</dataSource>
</environment>
</environments>
</configuration>
<dependencies>
<!-- MySql驱动 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.47</version>
</dependency>
评论0
最新资源