MyBatis Generator去掉生成的注解
作者:小码哥Java学院 时间:2022-08-29 22:01:03
是不是很讨厌mybatis Generator帮我们生成代码的时候在Mapper和mapper.xml文件中生成的一大堆注解?今天在看MyBatis Generator代码的时候发现,原来mybatis generator是提供了配置注解的能力,配置如下,在generatorConfig.xml中加上配置:
<commentGenerator>
<property name="suppressDate" value="true"/>
<property name="suppressAllComments" value="true" />
</commentGenerator>
即可;
其中suppressDate是去掉生成日期那行注释,suppressAllComments是去掉所有的注解;
另外,commentGenerator还可以配置一个type,设置自己的注解生成器,默认使用的是
org.mybatis.generator.internal.DefaultCommentGenerator;
以上所述是小编给大家介绍的MyBatis Generator去掉生成的注解,网站的支持!
来源:http://www.jianshu.com/p/4c71d2f122b2
标签:mybatis,generator,注解
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Mybatis-Plus之ID自动增长的设置实现
2022-10-27 00:09:47
![](https://img.aspxhome.com/file/2023/7/65767_0s.png)
IDEA不编译除了.java之外的文件的解决办法(推荐)
2023-09-16 15:50:44
![](https://img.aspxhome.com/file/2023/0/58570_0s.png)
C++对string进行大小写转换操作方法
2023-11-03 04:32:59
![](https://img.aspxhome.com/file/2023/5/103105_0s.png)
Java中lombok的@Builder注解的解析与简单使用详解
2022-12-29 06:44:55
Java 8 Stream操作类型及peek示例解析
2021-07-17 20:42:08
一篇文章带你入门Java Script
2023-09-12 06:09:24
c#和java base64不一致的解决方法
2022-11-24 02:18:55
![](https://img.aspxhome.com/file/2023/0/68740_0s.png)
详解JAVA中priorityqueue的具体使用
2022-05-17 22:53:50
![](https://img.aspxhome.com/file/2023/2/68222_0s.png)
java前后端加密解密crypto-js的实现
2023-11-29 12:09:31
java与scala数组及集合的基本操作对比
2022-03-03 05:52:27
Java中对话框的弹出方法
2022-04-24 14:35:52
通过IDEA快速定位和排除依赖冲突问题
2021-06-07 02:01:16
![](https://img.aspxhome.com/file/2023/9/71919_0s.png)
Visual Studio 2022 安装低版本 .Net Framework的图文教程
2023-06-22 19:18:44
![](https://img.aspxhome.com/file/2023/0/78990_0s.png)
js+java实现登录滑动图片验证
2022-02-21 21:17:17
![](https://img.aspxhome.com/file/2023/9/71199_0s.jpg)
SpringBoot集成阿里云OSS图片上传
2021-08-15 21:01:55
![](https://img.aspxhome.com/file/2023/9/66979_0s.jpg)
JAVA8 十大新特性详解
2023-07-02 10:03:27
简单了解JavaBean作用及常用操作
2023-09-08 19:59:29
![](https://img.aspxhome.com/file/2023/3/72643_0s.png)
基于ReentrantLock的实现原理讲解
2023-11-23 22:43:23
![](https://img.aspxhome.com/file/2023/9/59849_0s.jpg)
基于Java实现Json文件转换为Excel文件
2022-08-04 23:53:15
关于重写equals()方法和hashCode()方法及其简单的应用
2023-08-01 06:48:13
![](https://img.aspxhome.com/file/2023/5/57805_0s.jpg)