src/main/java/com/itfsw/mybatis/generator/plugins/utils/enhanced/TemplateCommentGenerator.java
@Override
    public void addJavaFileComment(CompilationUnit compilationUnit) {
        Map<String, Object> map = new HashMap<>();
        map.put("mgb", MergeConstants.NEW_ELEMENT_TAG);
        map.put("compilationUnit", compilationUnit);

        // 添加评论
        addCompilationUnitComment(compilationUnit, map, EnumNode.ADD_JAVA_FILE_COMMENT);
    }
@Override
    public void addJavaFileComment(CompilationUnit compilationUnit) {
        Map<String, Object> map = new HashMap<>();
        map.put("mgb", MergeConstants.NEW_ELEMENT_TAG);
        map.put("compilationUnit", compilationUnit);

        // 添加评论
        addCompilationUnitComment(compilationUnit, map, EnumNode.ADD_JAVA_FILE_COMMENT);
    }
@ Override public void addJavaFileComment ( CompilationUnit compilationUnit ) { Map < String , Object > map = new HashMap <> ( ) ; map . put ( "mgb" , MergeConstants . NEW_ELEMENT_TAG ) ; map . put ( "compilationUnit" , compilationUnit ) ; // 添加评论 addCompilationUnitComment ( compilationUnit , map , EnumNode . ADD_JAVA_FILE_COMMENT ) ; }
This method is called to add a file level comment to a generated java file. This method could be used to add a
general file comment (such as a copyright notice). However, note that the Java file merge function in Eclipse
does not deal with this comment. If you run the generator repeatedly, you will only retain the comment from the
initial run.
<p>

The default implementation does nothing.

@param compilationUnit
the compilation unit
This method is called to add a file level comment to a generated java file . This method could be used to add a general file comment ( such as a copyright notice ) . However note that the Java file merge function in Eclipse does not deal with this comment . If you run the generator repeatedly you will only retain the comment from the initial run . <p >