You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
3.4 KiB

<?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>
<context id="MySQL" targetRuntime="MyBatis3">
<!-- 为生成的Java模型创建一个toString方法 -->
<plugin type="org.mybatis.generator.plugins.ToStringPlugin"></plugin>
<!-- 自定义的序列化 类文件 插件 -->
<plugin type="org.mybatis.generator.plugins.SerializablePlugin"></plugin>
<!-- 重新生成xml文件,而不是追加 -->
<plugin type="org.mybatis.generator.plugins.UnmergeableXmlMappersPlugin" />
<commentGenerator>
<!-- 是否去除自动生成的注释 true:是 : false:否 -->
<property name="suppressAllComments" value="true" />
</commentGenerator>
<!--数据库连接的信息:驱动类、连接地址、用户名、密码 -->
<jdbcConnection driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://test.tall.wiki:3306/braintraining?useUnicode=true&amp;characterEncoding=UTF-8&amp;tinyInt1isBit=false"
userId="root"
password="po3OynBO[M3579p6L7)o">
</jdbcConnection>
<!-- 默认false,把JDBC DECIMAL 和 NUMERIC 类型解析为 Integer,为 true时把JDBC DECIMAL 和
NUMERIC 类型解析为java.math.BigDecimal -->
<javaTypeResolver>
<property name="forceBigDecimals" value="true" />
</javaTypeResolver>
<!-- targetProject:生成PO类的位置 -->
<javaModelGenerator targetPackage="com.ccsens.braintraining.bean.po"
targetProject=".\src\main\java">
<!-- enableSubPackages:是否让schema作为包的后缀 -->
<property name="enableSubPackages" value="false" />
<!-- 从数据库返回的值被清理前后的空格 -->
<property name="trimStrings" value="true" />
</javaModelGenerator>
<!-- targetProject:mapper映射文件生成的位置 -->
<sqlMapGenerator targetPackage="mapper_raw"
targetProject=".\src\main\resources">
<!-- enableSubPackages:是否让schema作为包的后缀 -->
<property name="enableSubPackages" value="false" />
</sqlMapGenerator>
<!-- targetPackage:mapper接口生成的位置 -->
<javaClientGenerator type="XMLMAPPER"
targetPackage="com.ccsens.braintraining.persist.mapper"
targetProject=".\src\main\java">
<!-- enableSubPackages:是否让schema作为包的后缀 -->
<property name="enableSubPackages" value="false" />
</javaClientGenerator>
<table tableName="t_assist_carousel" domainObjectName="AssistCarousel"/>
<table tableName="t_raffle_active" domainObjectName="RaffleActive"/>
<table tableName="t_raffle_prize" domainObjectName="RafflePrize"/>
<table tableName="t_raffle_record" domainObjectName="RaffleRecord"/>
<table tableName="t_raffle_task" domainObjectName="RaffleTask"/>
<table tableName="t_raffle_task_param" domainObjectName="RaffleTaskParam"/>
<table tableName="t_raffle_times" domainObjectName="RaffleTimes"/>
<table tableName="t_user" domainObjectName="User"/>
</context>
</generatorConfiguration>