Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-reportcenter
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 01286904
authored
Dec 15, 2020
by
111-PC\111
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]mybatis逆向工程整改
1 parent
1036d5a5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
3 deletions
pom.xml
src/main/resources/config/generatorConfig.xml
pom.xml
View file @
0128690
...
@@ -40,6 +40,17 @@
...
@@ -40,6 +40,17 @@
<version>
1.0.1-SNAPSHOT
</version>
<version>
1.0.1-SNAPSHOT
</version>
<scope>
compile
</scope>
<scope>
compile
</scope>
</dependency>
</dependency>
<!-- <dependency>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator</artifactId>
<version>1.3.7</version>
</dependency>
<dependency>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.7</version>
</dependency>-->
</dependencies>
</dependencies>
<build>
<build>
...
@@ -51,6 +62,37 @@
...
@@ -51,6 +62,37 @@
<skip>
true
</skip>
<skip>
true
</skip>
</configuration>
</configuration>
</plugin>
</plugin>
<plugin>
<groupId>
org.mybatis.generator
</groupId>
<artifactId>
mybatis-generator-maven-plugin
</artifactId>
<version>
1.3.2
</version>
<configuration>
<!-- 允许移动生成的文件 -->
<verbose>
true
</verbose>
<!-- 是否覆盖 -->
<overwrite>
true
</overwrite>
<!-- 配置文件 -->
<configurationFile>
src/main/resources/config/generatorConfig.xml
</configurationFile>
</configuration>
<!--此处添加一个mysql-connector-java依赖可以防止找不到jdbc Driver-->
<dependencies>
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<version>
8.0.19
</version>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
tk.mybatis
</groupId>
<artifactId>
mapper
</artifactId>
<version>
3.3.9
</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</plugins>
</build>
</build>
</project>
</project>
\ No newline at end of file
\ No newline at end of file
src/main/resources/config/generatorConfig.xml
View file @
0128690
...
@@ -50,7 +50,7 @@
...
@@ -50,7 +50,7 @@
</javaTypeResolver>
</javaTypeResolver>
<!-- 生成实体类地址 -->
<!-- 生成实体类地址 -->
<javaModelGenerator
targetPackage=
"c
om.glsx.neshield
.modules.entity"
targetProject=
"src/main/java"
>
<javaModelGenerator
targetPackage=
"c
n.com.glsx.report
.modules.entity"
targetProject=
"src/main/java"
>
<!-- 是否让schema作为包的后缀 -->
<!-- 是否让schema作为包的后缀 -->
<property
name=
"enableSubPackages"
value=
"true"
/>
<property
name=
"enableSubPackages"
value=
"true"
/>
<!-- 从数据库返回的值去掉前后空格 -->
<!-- 从数据库返回的值去掉前后空格 -->
...
@@ -63,11 +63,11 @@
...
@@ -63,11 +63,11 @@
</sqlMapGenerator>
</sqlMapGenerator>
<!-- 生成接口dao type="ANNOTATEDMAPPER",生成Java Model 和基于注解的Mapper对象 type="MIXEDMAPPER",生成基于注解的Java Model 和相应的Mapper对象 type="XMLMAPPER",生成SQLMap XML文件和独立的Mapper接口 -->
<!-- 生成接口dao type="ANNOTATEDMAPPER",生成Java Model 和基于注解的Mapper对象 type="MIXEDMAPPER",生成基于注解的Java Model 和相应的Mapper对象 type="XMLMAPPER",生成SQLMap XML文件和独立的Mapper接口 -->
<javaClientGenerator
targetPackage=
"c
om.glsx.neshield
.modules.mapper"
targetProject=
"src/main/java"
type=
"XMLMAPPER"
>
<javaClientGenerator
targetPackage=
"c
n.com.glsx.report
.modules.mapper"
targetProject=
"src/main/java"
type=
"XMLMAPPER"
>
<property
name=
"enableSubPackages"
value=
"false"
/>
<property
name=
"enableSubPackages"
value=
"false"
/>
</javaClientGenerator>
</javaClientGenerator>
<!-- table可以有多个,每个数据库中的表都可以写一个table,tableName表示要匹配的数据库表,也可以在tableName属性中通过使用%通配符来匹配所有数据库表,只有匹配的表才会自动生成文件 enableSelectByPrimaryKey相应的配置表示是否生成相应的接口 -->
<!-- table可以有多个,每个数据库中的表都可以写一个table,tableName表示要匹配的数据库表,也可以在tableName属性中通过使用%通配符来匹配所有数据库表,只有匹配的表才会自动生成文件 enableSelectByPrimaryKey相应的配置表示是否生成相应的接口 -->
<table
tableName=
"
t_user_path"
domainObjectName=
"UserPath
"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
<table
tableName=
"
base_provinces"
domainObjectName=
"baseProvinces
"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
</context>
</context>
</generatorConfiguration>
</generatorConfiguration>
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment