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