mybatis Generator生成代码的时候在Mapper和mapper.xml文件中生成的一大堆注解。mybatis generator是提供了配置注解的能力,在generatorConfig.xml中加上配置:
<commentGenerator>
<property name="suppressDate" value="true"/>
<property name="suppressAllComments" value="true" />
</commentGenerator>
suppressDate是去掉生成日期那行注释;
suppressAllComments是去掉所有的注释;
commentGenerator默认使用的是org.mybatis.generator.internal.DefaultCommentGenerator生成注解,通过配置type,可以设置自己的注释生成器。