From 2523f8b616bba47a78be86c7b89a3409f6a172d7 Mon Sep 17 00:00:00 2001 From: YunaiV <> Date: Sat, 23 Feb 2019 00:41:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=20order=20=E5=AD=90?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E9=A1=B9=E7=9B=AE=E7=BB=93=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- order/order-application/pom.xml | 102 ++++++++++++++++++ .../mall/order/ProductApplication.java | 13 +++ .../src/main/resources/application.yaml | 32 ++++++ .../src/main/resources}/mybatis-config.xml | 0 order/order-service-api/pom.xml | 15 +++ order/pom.xml | 20 ++++ pom.xml | 1 + .../src/main/resources/application.properties | 15 --- .../src/main/resources/application.yaml | 25 ++++- .../mapper/ProductCategoryMapper.xml | 0 .../{mybatis => }/mapper/ProductSkuMapper.xml | 0 .../src/main/resources/mybatis-config.xml | 19 ++++ 12 files changed, 224 insertions(+), 18 deletions(-) create mode 100644 order/order-application/pom.xml create mode 100644 order/order-application/src/main/java/cn/iocoder/mall/order/ProductApplication.java create mode 100644 order/order-application/src/main/resources/application.yaml rename {product/product-application/src/main/resources/mybatis => order/order-application/src/main/resources}/mybatis-config.xml (100%) create mode 100644 order/order-service-api/pom.xml create mode 100644 order/pom.xml delete mode 100644 product/product-application/src/main/resources/application.properties rename product/product-application/src/main/resources/{mybatis => }/mapper/ProductCategoryMapper.xml (100%) rename product/product-application/src/main/resources/{mybatis => }/mapper/ProductSkuMapper.xml (100%) create mode 100644 product/product-application/src/main/resources/mybatis-config.xml diff --git a/order/order-application/pom.xml b/order/order-application/pom.xml new file mode 100644 index 000000000..81dea751e --- /dev/null +++ b/order/order-application/pom.xml @@ -0,0 +1,102 @@ + + + + order + cn.iocoder.mall + 1.0-SNAPSHOT + + 4.0.0 + + order-application + + + 1.3.0.Final + + + + + org.springframework.boot + spring-boot-starter-web + + + mysql + mysql-connector-java + + + org.springframework.boot + spring-boot-starter-jdbc + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + 2.0.0 + + + + org.springframework.boot + spring-boot-starter-test + test + + + + com.alibaba + dubbo + 2.6.5 + + + + com.alibaba.boot + dubbo-spring-boot-starter + 0.2.1.RELEASE + + + + org.apache.curator + curator-framework + 2.12.0 + + + + org.mapstruct + mapstruct + ${org.mapstruct.version} + + + + + io.springfox + springfox-swagger2 + 2.9.2 + + + io.springfox + springfox-swagger-ui + 2.9.2 + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5.1 + + 1.8 + 1.8 + + + org.mapstruct + mapstruct-processor + ${org.mapstruct.version} + + + + + + + + \ No newline at end of file diff --git a/order/order-application/src/main/java/cn/iocoder/mall/order/ProductApplication.java b/order/order-application/src/main/java/cn/iocoder/mall/order/ProductApplication.java new file mode 100644 index 000000000..1df2b9d36 --- /dev/null +++ b/order/order-application/src/main/java/cn/iocoder/mall/order/ProductApplication.java @@ -0,0 +1,13 @@ +package cn.iocoder.mall.order; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class ProductApplication { + + public static void main(String[] args) { + SpringApplication.run(ProductApplication.class, args); + } + +} \ No newline at end of file diff --git a/order/order-application/src/main/resources/application.yaml b/order/order-application/src/main/resources/application.yaml new file mode 100644 index 000000000..1571ccb5a --- /dev/null +++ b/order/order-application/src/main/resources/application.yaml @@ -0,0 +1,32 @@ +spring: + application: + name: order-application + # datasource + datasource: + url: jdbc:mysql://127.0.0.1:33061/mall_order?useSSL=false + driver-class-name: com.mysql.jdbc.Driver + username: root + password: 123456 + +# server +server: + port: 8080 + +# mybatis +mybatis: + config-location: classpath:mybatis-config.xml + mapper-locations: classpath:mapper/*.xml + type-aliases-package: cn.iocoder.mall.order.dataobject + +# dubbo +dubbo: + registry: + address: zookeeper://127.0.0.1:2181 + protocol: + port: -1 + name: dubbo + scan: + base-packages: cn.iocoder.mall.order.service +demo: + service: + version: 1.0.0 \ No newline at end of file diff --git a/product/product-application/src/main/resources/mybatis/mybatis-config.xml b/order/order-application/src/main/resources/mybatis-config.xml similarity index 100% rename from product/product-application/src/main/resources/mybatis/mybatis-config.xml rename to order/order-application/src/main/resources/mybatis-config.xml diff --git a/order/order-service-api/pom.xml b/order/order-service-api/pom.xml new file mode 100644 index 000000000..23d69d81d --- /dev/null +++ b/order/order-service-api/pom.xml @@ -0,0 +1,15 @@ + + + + order + cn.iocoder.mall + 1.0-SNAPSHOT + + 4.0.0 + + order-service-api + + + \ No newline at end of file diff --git a/order/pom.xml b/order/pom.xml new file mode 100644 index 000000000..6facf3d6e --- /dev/null +++ b/order/pom.xml @@ -0,0 +1,20 @@ + + + + mall-parent + cn.iocoder.mall + 1.0-SNAPSHOT + + 4.0.0 + + order + pom + + order-application + order-service-api + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 1caaaca08..be5dd2ce6 100644 --- a/pom.xml +++ b/pom.xml @@ -15,6 +15,7 @@ 1.0-SNAPSHOT product + order pom diff --git a/product/product-application/src/main/resources/application.properties b/product/product-application/src/main/resources/application.properties deleted file mode 100644 index 3bb6630a7..000000000 --- a/product/product-application/src/main/resources/application.properties +++ /dev/null @@ -1,15 +0,0 @@ -# Spring boot application -spring.application.name=product-rest -# Base packages to scan Dubbo Component: @com.alibaba.dubbo.config.annotation.Service -dubbo.scan.base-packages=cn.iocoder.mall.product.service - -# Dubbo Protocol -dubbo.protocol.name=dubbo -## Random port -dubbo.protocol.port=-1 - -## Dubbo Registry -dubbo.registry.address=zookeeper://127.0.0.1:2181 - -## DemoService version -demo.service.version=1.0.0 \ No newline at end of file diff --git a/product/product-application/src/main/resources/application.yaml b/product/product-application/src/main/resources/application.yaml index 4f0aaa78f..a200bc9fe 100644 --- a/product/product-application/src/main/resources/application.yaml +++ b/product/product-application/src/main/resources/application.yaml @@ -1,4 +1,6 @@ spring: + application: + name: product-application # datasource datasource: url: jdbc:mysql://127.0.0.1:33061/mall_product?useSSL=false @@ -6,8 +8,25 @@ spring: username: root password: 123456 +# server +server: + port: 8081 + # mybatis mybatis: - config-location: classpath:mybatis/mybatis-config.xml - mapper-locations: classpath:mybatis/mapper/*.xml - type-aliases-package: cn.iocoder.mall.product.dataobject \ No newline at end of file + config-location: classpath:mybatis-config.xml + mapper-locations: classpath:mapper/*.xml + type-aliases-package: cn.iocoder.mall.product.dataobject + +# dubbo +dubbo: + registry: + address: zookeeper://127.0.0.1:2181 + protocol: + port: -1 + name: dubbo + scan: + base-packages: cn.iocoder.mall.product.service +demo: + service: + version: 1.0.0 \ No newline at end of file diff --git a/product/product-application/src/main/resources/mybatis/mapper/ProductCategoryMapper.xml b/product/product-application/src/main/resources/mapper/ProductCategoryMapper.xml similarity index 100% rename from product/product-application/src/main/resources/mybatis/mapper/ProductCategoryMapper.xml rename to product/product-application/src/main/resources/mapper/ProductCategoryMapper.xml diff --git a/product/product-application/src/main/resources/mybatis/mapper/ProductSkuMapper.xml b/product/product-application/src/main/resources/mapper/ProductSkuMapper.xml similarity index 100% rename from product/product-application/src/main/resources/mybatis/mapper/ProductSkuMapper.xml rename to product/product-application/src/main/resources/mapper/ProductSkuMapper.xml diff --git a/product/product-application/src/main/resources/mybatis-config.xml b/product/product-application/src/main/resources/mybatis-config.xml new file mode 100644 index 000000000..7f604cc7e --- /dev/null +++ b/product/product-application/src/main/resources/mybatis-config.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file