From ec2151c9efbdc872861cc9cbc339808d5a7d0920 Mon Sep 17 00:00:00 2001
From: sin <2943460818@qq.com>
Date: Sat, 11 May 2019 10:05:10 +0800
Subject: [PATCH] =?UTF-8?q?-=20=E6=B7=BB=E5=8A=A0=20mybatis-plus=20?=
=?UTF-8?q?=E9=9B=86=E6=88=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
order/order-service-impl/pom.xml | 5 +++++
.../src/main/resources/config/application.yaml | 14 ++++++++++++--
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/order/order-service-impl/pom.xml b/order/order-service-impl/pom.xml
index 3509008e5..881b6e0b1 100644
--- a/order/order-service-impl/pom.xml
+++ b/order/order-service-impl/pom.xml
@@ -94,6 +94,11 @@
org.apache.dubbo
dubbo-spring-boot-starter
+
+ com.baomidou
+ mybatis-plus-boot-starter
+ ${mybatis-plus.version}
+
org.mybatis.spring.boot
diff --git a/order/order-service-impl/src/main/resources/config/application.yaml b/order/order-service-impl/src/main/resources/config/application.yaml
index 70dc731f8..b583380eb 100644
--- a/order/order-service-impl/src/main/resources/config/application.yaml
+++ b/order/order-service-impl/src/main/resources/config/application.yaml
@@ -8,8 +8,18 @@ spring:
# mybatis
mybatis:
- config-location: classpath:mybatis-config.xml
- mapper-locations: classpath:mapper/*.xml
+# config-location: classpath:mybatis-config.xml
+# mapper-locations: classpath:mapper/*.xml
+# type-aliases-package: cn.iocoder.mall.order.biz.dataobject
+#
+# mybatis-plus
+mybatis-plus:
+ configuration:
+ map-underscore-to-camel-case: true # 虽然默认为 true ,但是还是显示去指定下。
+ global-config:
+ db-config:
+ id-type: auto
+ mapper-locations: classpath*:mapper/*.xml
type-aliases-package: cn.iocoder.mall.order.biz.dataobject
# dubbo