-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgeneratorConfig.xml
57 lines (48 loc) · 2.57 KB
/
generatorConfig.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
51
52
53
54
55
56
57
<?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">
<commentGenerator>
<property name="suppressAllComments" value="true" />
</commentGenerator>
<!--配置数据库连接信息-->
<jdbcConnection driverClass="com.mysql.cj.jdbc.Driver"
connectionURL="jdbc:mysql://localhost:3306/shop?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull"
userId="root"
password="123456">
</jdbcConnection>
<javaTypeResolver >
<property name="forceBigDecimals" value="false" />
</javaTypeResolver>
<!--entity-->
<javaModelGenerator targetPackage="com.wgy.shop.entity" targetProject=".\src\main\java">
<property name="enableSubPackages" value="true" />
<property name="trimStrings" value="true" />
</javaModelGenerator>
<!--xml-->
<sqlMapGenerator targetPackage="mapper" targetProject=".\src\main\resources">
<property name="enableSubPackages" value="true" />
</sqlMapGenerator>
<!--dao接口-->
<javaClientGenerator type="XMLMAPPER" targetPackage="com.wgy.shop.dao" targetProject=".\src\main\java">
<property name="enableSubPackages" value="true" />
</javaClientGenerator>
<!--指定哪个表的生成策略-->
<table tableName="activity" domainObjectName="Activity" />
<table tableName="address" domainObjectName="Address" />
<table tableName="admin" domainObjectName="Admin" />
<table tableName="category" domainObjectName="Category" />
<table tableName="chat" domainObjectName="Chat" />
<table tableName="favorite" domainObjectName="Favorite" />
<table tableName="comment" domainObjectName="Comment" />
<table tableName="deliver" domainObjectName="Deliver" />
<table tableName="goods" domainObjectName="Goods" />
<table tableName="imagepath" domainObjectName="ImagePath" />
<table tableName="userorder" domainObjectName="Order" />
<table tableName="orderitem" domainObjectName="OrderItem" />
<table tableName="shopcart" domainObjectName="ShopCart" />
<table tableName="consumer" domainObjectName="Consumer" />
</context>
</generatorConfiguration>