逆向工程文件
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.2</version>
<configuration>
<verbose>true</verbose>
<overwrite>true</overwrite>
</configuration>
</plugin>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
<!-- 连接mysql驱动包所在位置 -->
<classPathEntry location="F:\WorkSoft\LocalRepository\mysql\mysql-connector-java\5.1.43\mysql-connector-java-5.1.43.jar" />
<context id="db2tables" targetRuntime="MyBatis3">
<commentGenerator>
<!--是否去除自动生成的注释 true是,false否-->
<property name="suppressAllComments" value="true" />
</commentGenerator>
<!-- 数据库连接信息,驱动类、连接地址、用户名、密码 -->
<jdbcConnection driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://10.31.152.25:3306/xfkuaidi" userId="fanxiongfeng"
password="123456">
</jdbcConnection>
<!--<jdbcConnection driverClass="oracle.jdbc.OracleDriver"-->
<!--connectionURL="jdbc:oracle:thin:@localhost:1521:orcl" userId="scott"-->
<!--password="tigger">-->
<!--</jdbcConnection>-->
<!--默认false,把JDBC DECIMAL和NUMBERIC类型解析为Integer-->
<!--为true时,把JDBC DECIMAL和NUMBERIC类型解析为java.math.BigDecimal-->
<javaTypeResolver>
<property name="forceBigDecimals" value="false" />
</javaTypeResolver>
<!-- 生成POJO类 -->
<javaModelGenerator targetPackage="com.wuliu.pojo.po"
targetProject="src/main/java/">
<!--是否让schema作为包的后缀-->
<property name="enableSubPackages" value="false" />
<!--去除前后空格-->
<property name="trimStrings" value="true" />
</javaModelGenerator>
<!-- 生成mapper映射文件 -->
<sqlMapGenerator targetPackage="com.wuliu.dao"
targetProject="src/main/java/">
<!--同上-->
<property name="enableSubPackages" value="false" />
</sqlMapGenerator>
<!-- 生成mapper接口 -->
<javaClientGenerator type="XMLMAPPER"
targetPackage="com.wuliu.dao" targetProject="src/main/java/">
<!--同上-->
<property name="enableSubPackages" value="false" />
</javaClientGenerator>
<!-- 指定数据库表 -->
<table schema="" tableName="provinces"></table>
<!--<table tableName="UserInfo" domainObjectName="UserInfo"-->
<!--enableCountByExample="false" enableUpdateByExample="false"-->
<!--enableDeleteByExample="false" enableSelectByExample="false"-->
<!--selectByExampleQueryId="false" />-->
</context>
</generatorConfiguration>