Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mybatis-generator-plugin
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mybatis-generator-plugin
Commits
4aaa016e
Commit
4aaa016e
authored
Jul 07, 2017
by
hewei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新插件说明
parent
cc429d06
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
README.md
README.md
+7
-2
No files found.
README.md
View file @
4aaa016e
...
...
@@ -588,7 +588,7 @@ public class Test {
### 11. Table增加前缀插件
项目中有时会遇到配置多数据源对应多业务的情况,这种情况下可能会出现不同数据源出现重复表名,造成异常冲突。
该插件允许为表增加前缀,改变最终生成的Model、Mapper、Example类名以及xml名。
>warning:
请原谅我蹩脚的英文水平,一直没发现插件名称错了,1.0.9版本错误命名为TableSuffixPlugin,属性为suffix请新版本用户对应修正
!
>warning:
使用[Table重命名插件](12-table重命名插件)可以实现相同功能
!
插件:
```
xml
...
...
@@ -627,7 +627,12 @@ public class Test {
这种情况下我们就希望能有类似
[
columnRenamingRule
](
http://www.mybatis.org/generator/configreference/columnRenamingRule.html
)
这种重命名插件来修正最终生成的Model、Mapper等命名。
>该插件解决:使用正则替换table生成的Model、Example、Mapper等命名。
>warning:和插件[Table增加前缀插件](#11-table增加前缀插件)联合使用时,需注意顺序问题。
项目中有时会遇到配置多数据源对应多业务的情况,这种情况下可能会出现不同数据源出现重复表名,造成异常冲突。
该插件可以实现和
[
Table增加前缀插件
](
11-table增加前缀插件
)
相同的功能,仿照如下配置。
```
xml
<property
name=
"searchString"
value=
"^"
/>
<property
name=
"replaceString"
value=
"DB1"
/>
```
插件:
```
xml
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment