Do you hate a lot of annotations generated in the Mapper and mapper.xml files when mybatis Generator helps us generate code? Today, when I looked at the MyBatis Generator code, I found that mybatis generator provides the ability to configure annotations. The configuration is as follows: Add configuration to generatorConfig.xml:
<commentGenerator><property name="suppressDate" value="true"/><property name="suppressAllComments" value="true" /></commentGenerator>
Just do it;
where suppressDate removes the comments on the generation date, and suppressAllComments removes all comments;
In addition, commentGenerator can also configure a type to set its own annotation generator. The default is
org.mybatis.generator.internal.DefaultCommentGenerator;
The above is the annotation generated by MyBatis Generator introduced to you by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support to Wulin.com website!