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