-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenerator.xml
39 lines (37 loc) · 2.18 KB
/
generator.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?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 驱动jar包路径.路径 -->
<classPathEntry location="mysql-connector-java-5.1.35.jar"/>
<context id="mysql">
<!-- 为了防止生成的代码中有很多注释,比较难看,加入下面的配置控制 -->
<commentGenerator>
<property name="suppressDate" value="true"/>
<property name="suppressAllComments" value="true"/>
</commentGenerator>
<!-- 注释控制完毕 -->
<!-- 数据库连接 -->
<jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://rm-bp116802eans1qf74.mysql.rds.aliyuncs.com:3306/dubbo_demo?characterEncoding=utf8" userId="wang_zhenyu" password="ADEMRzNJD25uKOq9CbmkYWRxLpaxb5">
</jdbcConnection>
<javaTypeResolver>
<property name="forceBigDecimals" value="false"/>
</javaTypeResolver>
<!-- 数据表对应的model 层 -->
<javaModelGenerator targetPackage="com.xyy.saas.web.schedule.po" targetProject="src/main/java">
<property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/>
</javaModelGenerator>
<!-- sql mapper 隐射配置文件 -->
<sqlMapGenerator targetPackage="mapper.schedule" targetProject="src/main/resources">
<property name="enableSubPackages" value="true"/>
</sqlMapGenerator>
<!-- 在ibatis2 中是dao层,但在mybatis3中,其实就是mapper接口 -->
<javaClientGenerator type="XMLMAPPER" targetPackage="com.xyy.saas.web.schedule.dao" targetProject="src/main/java">
<property name="enableSubPackages" value="true"/>
</javaClientGenerator>
<!-- 要对那些数据表进行生成操作,必须要有一个. -->
<table tableName="mlt_test" domainObjectName="MltTest" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table>
</context>
</generatorConfiguration>