一、导包
<groupId>org.mybatis.generatorgroupId>
<artifactId>mybatis-generator-maven-pluginartifactId>
<configurationFile>GeneratorMapper.xmlconfigurationFile>
<overwrite>trueoverwrite>
二、GeneratorMapper.xml
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<classPathEntry location="E:\mysql-connector-java-5.1.38.jar"/>
<context id="tables" targetRuntime="MyBatis3">
<property name="suppressAllComments" value="true" />
<jdbcConnection driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://192.168.88.130:3306/p2p"
<javaModelGenerator targetPackage="com.abc.p2p.model"
targetProject="E:\course\035-p2p-SpringBoot\000-IDEA-projects\001-P2P-IDEA-SpringBoot\003-p2p-exterface\src\main\java">
<property name="enableSubPackages" value="false" />
<property name="trimStrings" value="false" />
<sqlMapGenerator targetPackage="com.abc.p2p.mapper" targetProject="src/main/java">
<property name="enableSubPackages" value="false" />
<javaClientGenerator type="XMLMAPPER" targetPackage="com.abc.p2p.mapper" targetProject="src/main/java">
<property name="enableSubPackages" value="false" />
<table tableName="b_loan_info" domainObjectName="LoanInfo"
enableCountByExample="false"
enableUpdateByExample="false"
enableDeleteByExample="false"
enableSelectByExample="false"
selectByExampleQueryId="false"/>
<table tableName="b_bid_info" domainObjectName="BidInfo"
enableCountByExample="false"
enableUpdateByExample="false"
enableDeleteByExample="false"
enableSelectByExample="false"
selectByExampleQueryId="false"/>
<table tableName="b_income_record" domainObjectName="IncomeRecord"
enableCountByExample="false"
enableUpdateByExample="false"
enableDeleteByExample="false"
enableSelectByExample="false"
selectByExampleQueryId="false"/>
<table tableName="b_recharge_record" domainObjectName="RechargeRecord"
enableCountByExample="false"
enableUpdateByExample="false"
enableDeleteByExample="false"
enableSelectByExample="false"
selectByExampleQueryId="false"/>
<table tableName="u_user" domainObjectName="User"
enableCountByExample="false"
enableUpdateByExample="false"
enableDeleteByExample="false"
enableSelectByExample="false"
selectByExampleQueryId="false"/>
<table tableName="u_finance_account" domainObjectName="FinanceAccount"
enableCountByExample="false"
enableUpdateByExample="false"
enableDeleteByExample="false"
enableSelectByExample="false"
selectByExampleQueryId="false"/>
