Repository navigation
Expand file tree
/
Copy pathgeneratorConfig.xml
More file actions
51 lines (42 loc) · 2.03 KB
/
Copy pathgeneratorConfig.xml
File metadata and controls
51 lines (42 loc) · 2.03 KB
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
<?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>
<!-- ojdbc的jar包 -->
<classPathEntry
location="D:/My Documents/Tencent Files/1131920499/FileRecv/mysql-connector5.1.jar" />
<context id="my" targetRuntime="MyBatis3">
<commentGenerator>
<property name="suppressDate" value="false" />
<property name="suppressAllComments" value="true" />
</commentGenerator>
<!-- 数据库连接信息 -->
<jdbcConnection driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://localhost:3306/video" userId="root"
password="root" />
<!-- model生成路径 -->
<javaModelGenerator targetPackage="com.cn.hnust.pojo"
targetProject="E:/workspace/Video/src/main/java/com">
<property name="enableSubPackages" value="true" />
<property name="trimStrings" value="true" />
</javaModelGenerator>
<!-- 映射xml文件生成路径 -->
<sqlMapGenerator targetPackage="com.cn.hnust.mapping"
targetProject="E:/workspace/Video/src/main/java">
<property name="enableSubPackages" value="true" />
</sqlMapGenerator>
<!-- 和xml文件关联的dao生成路径(生成文件名默认是***Mapper.java,习惯将其改名成 ***Dao.java) -->
<javaClientGenerator targetPackage="com.cn.hnust.mapping"
targetProject="E:/workspace/Video/src/main/java" type="XMLMAPPER">
<property name="enableSubPackages" value="true" />
</javaClientGenerator>
<!-- 目标表,如果有多个表就将此段拷贝分别配置 -->
<table tableName="admin"/>
<table tableName="course"/>
<table tableName="speaker"/>
<table tableName="subject"/>
<table tableName="user"/>
<table tableName="video"/>
</context>
</generatorConfiguration>