Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
platform
/
platform-shopmall-parent
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 14589028
authored
Apr 14, 2023
by
刘宇峰
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
mybatis generator生产对象使用lombok
1 parent
3178511e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
29 deletions
platform-shopmall/src/test/resources/generatorConfig.xml
platform-shopmall/src/test/resources/generatorConfig.xml
View file @
1458902
...
@@ -4,9 +4,6 @@
...
@@ -4,9 +4,6 @@
<!-- 配置生成器 -->
<!-- 配置生成器 -->
<generatorConfiguration>
<generatorConfiguration>
<!--classPathEntry:数据库的JDBC驱动,换成你自己的驱动位置 可选 -->
<!-- <classPathEntry location="F://jdbc//mysql-connector-java-8.0.18.jar"/>-->
<!-- 一个数据库一个context -->
<!-- 一个数据库一个context -->
<context
id=
"DB2Tables"
targetRuntime=
"Mybatis3"
>
<context
id=
"DB2Tables"
targetRuntime=
"Mybatis3"
>
<!-- 自动识别数据库关键字,默认false,如果设置为true,根据SqlReservedWords中定义的关键字列表;一般保留默认值,遇到数据库关键字(Java关键字),使用columnOverride覆盖 -->
<!-- 自动识别数据库关键字,默认false,如果设置为true,根据SqlReservedWords中定义的关键字列表;一般保留默认值,遇到数据库关键字(Java关键字),使用columnOverride覆盖 -->
...
@@ -27,6 +24,8 @@
...
@@ -27,6 +24,8 @@
<plugin
type=
"tk.mybatis.mapper.generator.MapperPlugin"
>
<plugin
type=
"tk.mybatis.mapper.generator.MapperPlugin"
>
<property
name=
"mappers"
value=
"com.glsx.plat.mybatis.mapper.CommonBaseMapper"
/>
<property
name=
"mappers"
value=
"com.glsx.plat.mybatis.mapper.CommonBaseMapper"
/>
</plugin>
</plugin>
<!-- 整合 lombok 插件 -->
<plugin
type=
"com.glsx.plat.generator.plugins.LombokPlugin"
/>
<!--配置生成注释信息,最多配置一个 -->
<!--配置生成注释信息,最多配置一个 -->
<commentGenerator>
<commentGenerator>
...
@@ -50,7 +49,8 @@
...
@@ -50,7 +49,8 @@
</javaTypeResolver>
</javaTypeResolver>
<!-- 生成实体类地址 -->
<!-- 生成实体类地址 -->
<javaModelGenerator
targetPackage=
"cn.com.glsx.admin.modules.entity"
targetProject=
"../platform-shopmall-api/src/main/java"
>
<javaModelGenerator
targetPackage=
"cn.com.glsx.admin.modules.entity"
targetProject=
"../platform-shopmall-api/src/main/java"
>
<!-- 是否让schema作为包的后缀 -->
<!-- 是否让schema作为包的后缀 -->
<property
name=
"enableSubPackages"
value=
"true"
/>
<property
name=
"enableSubPackages"
value=
"true"
/>
<!-- 从数据库返回的值去掉前后空格 -->
<!-- 从数据库返回的值去掉前后空格 -->
...
@@ -63,34 +63,12 @@
...
@@ -63,34 +63,12 @@
</sqlMapGenerator>
</sqlMapGenerator>
<!-- 生成接口dao type="ANNOTATEDMAPPER",生成Java Model 和基于注解的Mapper对象 type="MIXEDMAPPER",生成基于注解的Java Model 和相应的Mapper对象 type="XMLMAPPER",生成SQLMap XML文件和独立的Mapper接口 -->
<!-- 生成接口dao type="ANNOTATEDMAPPER",生成Java Model 和基于注解的Mapper对象 type="MIXEDMAPPER",生成基于注解的Java Model 和相应的Mapper对象 type="XMLMAPPER",生成SQLMap XML文件和独立的Mapper接口 -->
<javaClientGenerator
targetPackage=
"cn.com.glsx.admin.modules.mapper"
targetProject=
"src/main/java"
type=
"XMLMAPPER"
>
<javaClientGenerator
targetPackage=
"cn.com.glsx.admin.modules.mapper"
targetProject=
"src/main/java"
type=
"XMLMAPPER"
>
<property
name=
"enableSubPackages"
value=
"false"
/>
<property
name=
"enableSubPackages"
value=
"false"
/>
</javaClientGenerator>
</javaClientGenerator>
<!-- table可以有多个,每个数据库中的表都可以写一个table,tableName表示要匹配的数据库表,也可以在tableName属性中通过使用%通配符来匹配所有数据库表,只有匹配的表才会自动生成文件 enableSelectByPrimaryKey相应的配置表示是否生成相应的接口 -->
<!-- table可以有多个,每个数据库中的表都可以写一个table,tableName表示要匹配的数据库表,也可以在tableName属性中通过使用%通配符来匹配所有数据库表,只有匹配的表才会自动生成文件 enableSelectByPrimaryKey相应的配置表示是否生成相应的接口 -->
<table
tableName=
"shopmall_after_sales_order"
domainObjectName=
"AfterSalesOrder"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
<table
tableName=
"shopmall_test"
domainObjectName=
"ShopmallTest"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
<table
tableName=
"shopmall_after_sales_order_goods"
domainObjectName=
"AfterSalesOrderGoods"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
<table
tableName=
"shopmall_after_sales_order_node"
domainObjectName=
"AfterSalesOrderNode"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
<table
tableName=
"shopmall_after_sales_order_redelivery_express"
domainObjectName=
"AfterSalesOrderRedeliveryExpress"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
<table
tableName=
"shopmall_after_sales_order_sendback_address"
domainObjectName=
"AfterSalesOrderSendbackAddress"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
<table
tableName=
"shopmall_base_brand"
domainObjectName=
"BaseBrand"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
<table
tableName=
"shopmall_base_category"
domainObjectName=
"BaseCategory"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
<table
tableName=
"shopmall_base_district"
domainObjectName=
"BaseDistrict"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
<table
tableName=
"shopmall_base_express"
domainObjectName=
"BaseExpress"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
<table
tableName=
"shopmall_goods"
domainObjectName=
"Goods"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
<table
tableName=
"shopmall_goods_attribute"
domainObjectName=
"GoodsAttribute"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
<table
tableName=
"shopmall_goods_image"
domainObjectName=
"GoodsImage"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
<table
tableName=
"shopmall_goods_sale_limit"
domainObjectName=
"GoodsSaleLimit"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
<table
tableName=
"shopmall_goods_specification"
domainObjectName=
"GoodsSpecification"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
<table
tableName=
"shopmall_goods_stock"
domainObjectName=
"GoodsStock"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
<table
tableName=
"shopmall_order"
domainObjectName=
"Order"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
<table
tableName=
"shopmall_order_child"
domainObjectName=
"OrderChild"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
<table
tableName=
"shopmall_order_child_goods"
domainObjectName=
"OrderChildGoods"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
<table
tableName=
"shopmall_order_invoice"
domainObjectName=
"OrderInvoice"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
<table
tableName=
"shopmall_order_logistic"
domainObjectName=
"OrderLogistic"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
<table
tableName=
"shopmall_order_logistic_shipment"
domainObjectName=
"OrderLogisticShipment"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
<table
tableName=
"shopmall_order_logistic_shipment_track"
domainObjectName=
"OrderLogisticShipmentTrack"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
<table
tableName=
"shopmall_order_receive_address"
domainObjectName=
"OrderReceiveAddress"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
<table
tableName=
"shopmall_goods_desc_detail"
domainObjectName=
"GoodsDescDetail"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
/>
</context>
</context>
</generatorConfiguration>
</generatorConfiguration>
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment