新增注释插件
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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();
|
||||
|
||||
-20
@@ -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}
|
||||
*
|
||||
Reference in New Issue
Block a user