<?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>
<!-- 配置数据库连接的包 -->
<!--<classPathEntry location="D:\mysql-java\mysql-connector-java-5.1.48\mysql-connector-java-5.1.48.jar"/>-->
<context id="MyGererator" targetRuntime="MyBatis3" defaultModelType="flat">
<!-- 这个标签可以去掉注释 -->
<commentGenerator>
<!-- 去掉注释 -->
<property name="suppressAllComments" value="true" />
<!-- 去掉时间戳 -->
<property name="suppressDate" value="true" />
</commentGenerator>
<!-- 数据库连接信息 -->
<jdbcConnection driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://47.108.133.63:3306/finance?serverTimezone=GMT%2B8" userId="root"
password="">
<property name="nullCatalogMeansCurrent" value="true"/>
</jdbcConnection>
<!-- JAVA JDBC数据类型转换 -->
<javaTypeResolver>
<property name="forceBigDecimals" value="false" />
</javaTypeResolver>
<!-- javaModelGenerator javaBean配置 targetPackage 输入包名 输出路径 targetProject
输出项目位置 -->
<javaModelGenerator targetPackage="com.bjpowernode.finance.entity"
targetProject="src\main\java">
<!-- enableSubPackages 是否开启子包名称 是否在包名后边加上scheme名称 -->
<property name="enableSubPackages" value="false" />
<!-- 在Set中加入.trim -->
<!--trimStrings:是否对数据库查询结果进行trim操作,如果设置为true就会生成类似这样
public void setUsername(String username) {this.username = username == null ? null : username.trim();}的setter方法。默认值为false。
-->
<property name="trimStrings" value="true" />
</javaModelGenerator>
<!-- mapper.xml -->
<sqlMapGenerator targetPackage="com.bjpowernode.finance.mapper"
targetProject="src\main\java">
<property name="enableSubPackages" value="false" />
</sqlMapGenerator>
<!-- java接口 -->
<javaClientGenerator type="XMLMAPPER"
targetPackage="com.bjpowernode.finance.mapper" targetProject="src\main\java">
<property name="enableSubPackages" value="true" />
</javaClientGenerator>
<!-- 数据表 要根据数据库中的表来生成 -->
<!-- <table tableName="admin" domainObjectName="Admin" />-->
<!-- <table tableName="bank" domainObjectName="Bank" />-->
<!-- <table tableName="bankcard" domainObjectName="Bankcard" />-->
<table tableName="admin_permissions" domainObjectName="AdminPermissions" />
<!-- <table tableName="change_money" domainObjectName="ChangeMoney" />-->
<!-- <table tableName="fund_product" domainObjectName="FundProduct" />-->
<!-- <table tableName="info" domainObjectName="Info" />-->
<!-- <table tableName="loan" domainObjectName="Loan" />-->
<!-- <table tableName="news" domainObjectName="News" />-->
<!-- <table tableName="pay_money" domainObjectName="PayMoney" />-->
<!-- <table tableName="permissions" domainObjectName="Permissions" />-->
<!-- <table tableName="term_financial" domainObjectName="TermFinancial" />-->
<!-- <table tableName="user" domainObjectName="User" />-->
<!-- <table tableName="user_change_money" domainObjectName="UserChangeMoney" />-->
<!-- <table tableName="user_fund_product" domainObjectName="UserFundProduct" />-->
<!-- <table tableName="user_pay_money" domainObjectName="UserPayMoney" />-->
<!-- <table tableName="user_permissions" domainObjectName="UserPermissions" />-->
<!-- <table tableName="user_term_financial" domainObjectName="UserTermFinancial" />-->
<!-- <table tableName="flow_of_funds" domainObjectName="FlowOfFunds" />-->
<!-- <table schema="DB2ADMIN" tableName="ALLTYPES" domainObjectName="Customer"
> <property name="useActualColumnNames" value="true"/> <generatedKey column="ID"
sqlStatement="DB2" identity="true" /> <columnOverride column="DATE_FIELD"
property="startDate" /> <ignoreColumn column="FRED" /> <columnOverride column="LONG_VARCHAR_FIELD"
jdbcType="VARCHAR" /> </table> -->
</context>
</generatorConfiguration>
Mybatis逆向工程的配置
最新推荐文章于 2021-09-21 10:49:38 发布