-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmbg.xml
50 lines (40 loc) · 2.02 KB
/
mbg.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
40
41
42
43
44
45
46
47
48
49
50
<?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>
<!-- 指定外部的属性元素 -->
<properties resource="application.properties"/>
<context id="Mysql" targetRuntime="MyBatis3">
<!--取消生成注释-->
<commentGenerator>
<property name="suppressAllComments" value="true" />
</commentGenerator>
<!--配置数据库连接-->
<jdbcConnection driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://123.206.180.67/crud"
userId="root"
password="1132214759a">
</jdbcConnection>
<javaTypeResolver >
<property name="forceBigDecimals" value="false" />
</javaTypeResolver>
<!--指定javaBean生成位置-->
<javaModelGenerator targetPackage="com.edu.entity" targetProject=".\src\main\java">
<property name="enableSubPackages" value="true" />
<property name="trimStrings" value="true" />
</javaModelGenerator>
<!--指定sql映射文件指定位置-->
<!--<sqlMapGenerator targetPackage="mapper" targetProject=".\src\main\resources">-->
<!--<property name="enableSubPackages" value="true" />-->
<!--</sqlMapGenerator>-->
<!-- 指定dao接口生成的位置,mapper接口 -->
<javaClientGenerator type="ANNOTATEDMAPPER" targetPackage="com.edu.dao" targetProject=".\src\main\java">
<property name="enableSubPackages" value="true" />
</javaClientGenerator>
<!-- table指定每个表的生成策略 -->
<table tableName="department" domainObjectName="Department"></table>
<table tableName="employee" domainObjectName="Employee"></table>
<table tableName="user" domainObjectName="User"></table>
</context>
</generatorConfiguration>