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
ffcbdc12
Commit
ffcbdc12
authored
Jun 09, 2017
by
hewei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增注释插件
parent
ccbdad7e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
21 deletions
+13
-21
pom.xml
pom.xml
+12
-0
src/main/java/com/itfsw/mybatis/generator/plugins/utils/BasePlugin.java
...com/itfsw/mybatis/generator/plugins/utils/BasePlugin.java
+1
-1
src/main/resources/default-comment.ftl
src/main/resources/default-comment.ftl
+0
-20
No files found.
pom.xml
View file @
ffcbdc12
...
...
@@ -41,6 +41,18 @@
<artifactId>
slf4j-api
</artifactId>
<version>
1.7.22
</version>
</dependency>
<!-- 模板引擎 -->
<dependency>
<groupId>
org.freemarker
</groupId>
<artifactId>
freemarker
</artifactId>
<version>
2.3.26-incubating
</version>
</dependency>
<!-- xml 解析 -->
<dependency>
<groupId>
dom4j
</groupId>
<artifactId>
dom4j
</artifactId>
<version>
1.6.1
</version>
</dependency>
<!-- junit -->
<dependency>
<groupId>
junit
</groupId>
...
...
src/main/java/com/itfsw/mybatis/generator/plugins/utils/BasePlugin.java
View file @
ffcbdc12
...
...
@@ -58,7 +58,7 @@ public class BasePlugin extends PluginAdapter {
if
(
cfg
==
null
||
cfg
.
getProperty
(
CommentPlugin
.
PRE_TEMPLATE
)
==
null
){
if
(
context
.
getCommentGenerator
()
instanceof
DefaultCommentGenerator
){
// 使用默认模板引擎
commentGenerator
=
new
TemplateCommentGenerator
(
"
mybatis-generator
-comment.ftl"
,
true
);
commentGenerator
=
new
TemplateCommentGenerator
(
"
default
-comment.ftl"
,
true
);
}
else
{
// 用户自定义
commentGenerator
=
context
.
getCommentGenerator
();
...
...
src/main/resources/
mybatis-generator
-comment.ftl
→
src/main/resources/
default
-comment.ftl
View file @
ffcbdc12
...
...
@@ -118,26 +118,6 @@
<
/#list>
<
/#if>
*
* This class was generated by MyBatis Generator.
* This class corresponds to the database table ${introspectedTable.fullyQualifiedTable}
*
* ${mgb}
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
]]>
</comment>
<!-- #############################################################################################################
/**
* Adds the inner class comment.
*
* @param innerClass
* the inner class
* @param introspectedTable
* the introspected table
*/
-->
<comment
ID=
"addClassComment"
>
<![CDATA[
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table ${introspectedTable.fullyQualifiedTable}
*
...
...
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