Commit ffcbdc12 authored by hewei's avatar hewei

新增注释插件

parent ccbdad7e
......@@ -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();
......
......@@ -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}
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment