mybatis逆向工程插件优化
This commit is contained in:
@@ -11,18 +11,14 @@
|
||||
<property name="searchString" value="Example$" />
|
||||
<property name="replaceString" value="Criteria" />
|
||||
</plugin>
|
||||
<!-- 只保留Selective版本的方法 -->
|
||||
<plugin type="com.example.workutils.biz.mybatis.generator.SelectiveOnlyPlugin" />
|
||||
<!-- 使用Lombok @Data注解,不生成getter/setter -->
|
||||
<plugin type="com.example.workutils.biz.mybatis.generator.LombokPlugin" />
|
||||
|
||||
<commentGenerator>
|
||||
<!-- 1. 关闭所有默认的注释生成(英文说明、生成器标记) -->
|
||||
<property name="suppressAllComments" value="false"/>
|
||||
<!-- 2. 开启数据库字段的中文注释(保留表/字段备注) -->
|
||||
<commentGenerator type="com.example.workutils.biz.mybatis.generator.CustomCommentGenerator">
|
||||
<!-- 开启数据库字段的中文注释(保留表/字段备注) -->
|
||||
<property name="addRemarkComments" value="true"/>
|
||||
<!-- 3. 去掉日期信息 -->
|
||||
<property name="suppressDate" value="true"/>
|
||||
<!-- 4. 【关键】禁用 Legacy 模式,让它只生成字段备注 -->
|
||||
<property name="useLegacyCommentGenerator" value="false"/>
|
||||
<!-- 5. 去掉 @mbg.generated 标记 -->
|
||||
<property name="disableCommentAnnotation" value="true"/>
|
||||
</commentGenerator>
|
||||
|
||||
<!--数据库连接信息。 -->
|
||||
|
||||
Reference in New Issue
Block a user