From f2c5ed6c47431d11e8aaf80c1ddbb17a2695942e Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 13 May 2019 22:59:47 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E5=90=8E=E7=AB=AF=EF=BC=9A=E6=95=B4?= =?UTF-8?q?=E7=90=86=20pom=20=E6=96=87=E4=BB=B6=EF=BC=8C=E6=B4=81=E7=99=96?= =?UTF-8?q?=E9=AC=BC=E9=99=84=E4=BD=93~?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/common-framework/pom.xml | 96 +++++++--------- common/mall-spring-boot/pom.xml | 4 +- ops/pom.xml | 13 ++- order/order-application/pom.xml | 81 ++++---------- order/order-service-api/pom.xml | 9 +- order/order-service-impl/pom.xml | 98 ++++++++-------- .../order/biz/service/OrderServiceImpl.java | 2 +- pay/pay-application/pom.xml | 41 +------ pay/pay-service-api/pom.xml | 8 +- pay/pay-service-impl/pom.xml | 105 +++++++++--------- .../pay/biz/config/DatabaseConfiguration.java | 4 +- .../config/ServiceExceptionConfiguration.java | 9 +- .../main/resources/config/application.yaml | 2 +- pom.xml | 36 +++++- search/search-application/pom.xml | 8 +- search/search-service-api/pom.xml | 8 +- search/search-service-impl/pom.xml | 39 ++++--- 17 files changed, 256 insertions(+), 307 deletions(-) diff --git a/common/common-framework/pom.xml b/common/common-framework/pom.xml index a98245a4..0aa12f44 100644 --- a/common/common-framework/pom.xml +++ b/common/common-framework/pom.xml @@ -11,88 +11,68 @@ common-framework + - org.springframework - spring-web - 5.1.5.RELEASE + javax.servlet + servlet-api + org.springframework spring-web - 5.1.5.RELEASE - compile org.springframework spring-webmvc - 5.1.5.RELEASE - - javax.servlet - servlet-api - 2.5 - provided - - - - org.slf4j - slf4j-api - - - com.fasterxml.jackson.core - jackson-annotations - 2.9.7 - - - org.hibernate - hibernate-validator - - 6.0.16.Final - - - - - - - - - - com.alibaba - fastjson - 1.2.56 - - - org.apache.commons - commons-lang3 - + org.mybatis mybatis - - com.fasterxml.jackson.core - jackson-databind - 2.9.8 - compile - - - com.fasterxml.jackson.core - jackson-annotations - 2.9.7 - compile - + org.apache.dubbo dubbo - compile + org.apache.skywalking apm-toolkit-trace - 6.1.0 + + + + + org.slf4j + slf4j-api + + + + + org.hibernate + hibernate-validator + + + + com.alibaba + fastjson + + + + org.apache.commons + commons-lang3 + + + + com.fasterxml.jackson.core + jackson-annotations + + + com.fasterxml.jackson.core + jackson-databind diff --git a/common/mall-spring-boot/pom.xml b/common/mall-spring-boot/pom.xml index 879a79fd..b7e3aff9 100644 --- a/common/mall-spring-boot/pom.xml +++ b/common/mall-spring-boot/pom.xml @@ -12,12 +12,12 @@ mall-spring-boot + cn.iocoder.mall common-framework 1.0-SNAPSHOT - cn.iocoder.mall system-sdk @@ -31,11 +31,13 @@ true + org.springframework.boot spring-boot-starter + org.springframework spring-webmvc diff --git a/ops/pom.xml b/ops/pom.xml index de6fb020..4ea6e71b 100644 --- a/ops/pom.xml +++ b/ops/pom.xml @@ -12,7 +12,13 @@ ops + + + org.springframework.boot + spring-boot-starter-web + + de.codecentric spring-boot-admin-starter-server @@ -24,11 +30,6 @@ 2.1.3 - - org.springframework.boot - spring-boot-starter-web - - @@ -46,4 +47,4 @@ - \ No newline at end of file + diff --git a/order/order-application/pom.xml b/order/order-application/pom.xml index fca546ef..2eb28a15 100644 --- a/order/order-application/pom.xml +++ b/order/order-application/pom.xml @@ -11,18 +11,18 @@ order-application - - 1.3.0.Final - - - - + cn.iocoder.mall common-framework 1.0-SNAPSHOT + + cn.iocoder.mall + mall-spring-boot + 1.0-SNAPSHOT + cn.iocoder.mall order-service-impl @@ -38,68 +38,33 @@ user-sdk 1.0-SNAPSHOT - - cn.iocoder.mall - mall-spring-boot - 1.0-SNAPSHOT - - - - org.mapstruct - mapstruct - ${org.mapstruct.version} - - - org.apache.curator - curator-framework - 2.12.0 - - - - - org.apache.dubbo - dubbo - + org.springframework.boot spring-boot-starter-web - - - - - + + + io.springfox + springfox-swagger2 + + + com.github.xiaoymin + swagger-bootstrap-ui + + + + + de.codecentric + spring-boot-admin-starter-client + org.springframework.boot spring-boot-starter-actuator - - - - - - - - de.codecentric - spring-boot-admin-starter-client - 2.1.3 - - - - - io.springfox - springfox-swagger2 - 2.9.2 - - - io.springfox - springfox-swagger-ui - 2.9.2 - - - + org.springframework.boot spring-boot-starter-test diff --git a/order/order-service-api/pom.xml b/order/order-service-api/pom.xml index 6642451e..c84e89f4 100644 --- a/order/order-service-api/pom.xml +++ b/order/order-service-api/pom.xml @@ -12,7 +12,7 @@ order-service-api - + cn.iocoder.mall common-framework @@ -29,11 +29,7 @@ 1.0-SNAPSHOT - - - javax.validation - validation-api - + org.mapstruct mapstruct @@ -42,6 +38,7 @@ org.mapstruct mapstruct-jdk8 + org.projectlombok lombok diff --git a/order/order-service-impl/pom.xml b/order/order-service-impl/pom.xml index 7d9dfd68..5b16357e 100644 --- a/order/order-service-impl/pom.xml +++ b/order/order-service-impl/pom.xml @@ -12,8 +12,7 @@ order-service-impl - - + cn.iocoder.mall user-sdk @@ -52,51 +51,24 @@ 1.0-SNAPSHOT - - - com.google.guava - guava - 27.0.1-jre - - - com.xuxueli - xxl-job-core - 2.0.1 - - - + mysql mysql-connector-java - - - - - - - - - - + + org.springframework + spring-tx + + + org.springframework + spring-jdbc + - - org.apache.dubbo - dubbo - - - org.apache.curator - curator-framework - - - org.apache.curator - curator-recipes - - - org.apache.dubbo - dubbo-spring-boot-starter + com.alibaba + druid-spring-boot-starter @@ -104,22 +76,54 @@ mybatis-plus-boot-starter - - org.apache.rocketmq - rocketmq-spring-boot-starter - - io.seata seata-spring - io.seata seata-dubbo - + + + org.apache.dubbo + dubbo + + + org.apache.dubbo + dubbo-spring-boot-starter + + + + + org.apache.rocketmq + rocketmq-spring-boot-starter + + + + + com.xuxueli + xxl-job-core + + + + + org.apache.curator + curator-framework + + + org.apache.curator + curator-recipes + + + + + com.google.guava + guava + + + org.springframework.boot spring-boot-starter-test diff --git a/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/service/OrderServiceImpl.java b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/service/OrderServiceImpl.java index 436cb04d..2ac5123d 100644 --- a/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/service/OrderServiceImpl.java +++ b/order/order-service-impl/src/main/java/cn/iocoder/mall/order/biz/service/OrderServiceImpl.java @@ -212,7 +212,7 @@ public class OrderServiceImpl implements OrderService { @Override @GlobalTransactional - @Transactional // TODO 芋艿,先不考虑分布式事务的问题 +// @Transactional // 使用 Seata 分布事务后,无需在使用 @Transactional 注解。 public CommonResult createOrder(OrderCreateDTO orderCreateDTO) { Integer userId = orderCreateDTO.getUserId(); List orderItemDTOList = orderCreateDTO.getOrderItems(); diff --git a/pay/pay-application/pom.xml b/pay/pay-application/pom.xml index 49fdb777..51ffd85a 100644 --- a/pay/pay-application/pom.xml +++ b/pay/pay-application/pom.xml @@ -12,6 +12,7 @@ pay-application + cn.iocoder.mall common-framework @@ -38,31 +39,12 @@ 1.0-SNAPSHOT + org.springframework.boot spring-boot-starter-web - - org.springframework.boot - spring-boot-starter-test - test - - - - org.apache.dubbo - dubbo - - - - - - - - org.apache.curator - curator-framework - - io.springfox springfox-swagger2 @@ -70,30 +52,19 @@ com.github.xiaoymin swagger-bootstrap-ui - true + org.springframework.boot - spring-boot-devtools - true + spring-boot-starter-test + test - - - - - - - - - - - + de.codecentric spring-boot-admin-starter-client - 2.1.3 org.springframework.boot diff --git a/pay/pay-service-api/pom.xml b/pay/pay-service-api/pom.xml index fc8bf89c..d862a0d3 100644 --- a/pay/pay-service-api/pom.xml +++ b/pay/pay-service-api/pom.xml @@ -12,17 +12,14 @@ pay-service-api + cn.iocoder.mall common-framework 1.0-SNAPSHOT - - javax.validation - validation-api - - + org.mapstruct mapstruct @@ -31,6 +28,7 @@ org.mapstruct mapstruct-jdk8 + org.projectlombok lombok diff --git a/pay/pay-service-impl/pom.xml b/pay/pay-service-impl/pom.xml index e3e5ab76..0d900e7f 100644 --- a/pay/pay-service-impl/pom.xml +++ b/pay/pay-service-impl/pom.xml @@ -12,10 +12,12 @@ pay-service-impl - - + + + cn.iocoder.mall + common-framework + 1.0-SNAPSHOT + cn.iocoder.mall system-service-api @@ -26,68 +28,69 @@ pay-service-api 1.0-SNAPSHOT - - - cn.iocoder.mall - common-framework - 1.0-SNAPSHOT - - + mysql mysql-connector-java + - org.springframework.boot - spring-boot-starter-jdbc + org.springframework + spring-tx - org.mybatis.spring.boot - mybatis-spring-boot-starter + org.springframework + spring-jdbc - + + com.alibaba + druid-spring-boot-starter + + + + com.baomidou + mybatis-plus-boot-starter + + + + + org.apache.dubbo + dubbo + + + org.apache.dubbo + dubbo-spring-boot-starter + + + + + org.apache.rocketmq + rocketmq-spring-boot-starter + + + + + com.xuxueli + xxl-job-core + + + com.google.guava guava + + Pingplusplus pingpp-java 2.2.4 jar - - com.xuxueli - xxl-job-core - - - org.apache.rocketmq - rocketmq-spring-boot-starter - - - - - - - - - org.springframework.boot - spring-boot-starter-web - - - - org.apache.dubbo - dubbo - + org.apache.curator curator-framework @@ -96,17 +99,19 @@ org.apache.curator curator-recipes - - org.apache.dubbo - dubbo-spring-boot-starter - - + org.springframework.boot spring-boot-starter-test test + + org.springframework.boot + spring-boot-starter-web + test + + diff --git a/pay/pay-service-impl/src/main/java/cn/iocoder/mall/pay/biz/config/DatabaseConfiguration.java b/pay/pay-service-impl/src/main/java/cn/iocoder/mall/pay/biz/config/DatabaseConfiguration.java index ceac6e5b..b98b2998 100644 --- a/pay/pay-service-impl/src/main/java/cn/iocoder/mall/pay/biz/config/DatabaseConfiguration.java +++ b/pay/pay-service-impl/src/main/java/cn/iocoder/mall/pay/biz/config/DatabaseConfiguration.java @@ -9,6 +9,6 @@ import org.springframework.transaction.annotation.EnableTransactionManagement; @EnableTransactionManagement(proxyTargetClass = true) // 启动事务管理。为什么使用 proxyTargetClass 参数,参见 https://blog.csdn.net/huang_550/article/details/76492600 public class DatabaseConfiguration { - // 数据源,使用 HikariCP + // 数据源,使用 Druid -} \ No newline at end of file +} diff --git a/pay/pay-service-impl/src/main/java/cn/iocoder/mall/pay/biz/config/ServiceExceptionConfiguration.java b/pay/pay-service-impl/src/main/java/cn/iocoder/mall/pay/biz/config/ServiceExceptionConfiguration.java index d5ec450b..d72c7073 100644 --- a/pay/pay-service-impl/src/main/java/cn/iocoder/mall/pay/biz/config/ServiceExceptionConfiguration.java +++ b/pay/pay-service-impl/src/main/java/cn/iocoder/mall/pay/biz/config/ServiceExceptionConfiguration.java @@ -11,16 +11,9 @@ public class ServiceExceptionConfiguration { @EventListener(ApplicationReadyEvent.class) // 可参考 https://www.cnblogs.com/ssslinppp/p/7607509.html public void initMessages() { -// 从 service_exception_message.properties 加载错误码的方案 -// Properties properties; -// try { -// properties = PropertiesLoaderUtils.loadAllProperties("classpath:service_exception_message.properties"); -// } catch (IOException e) { -// throw new RuntimeException(e); -// } for (PayErrorCodeEnum item : PayErrorCodeEnum.values()) { ServiceExceptionUtil.put(item.getCode(), item.getMessage()); } } -} \ No newline at end of file +} diff --git a/pay/pay-service-impl/src/main/resources/config/application.yaml b/pay/pay-service-impl/src/main/resources/config/application.yaml index 800ee983..2acaa631 100644 --- a/pay/pay-service-impl/src/main/resources/config/application.yaml +++ b/pay/pay-service-impl/src/main/resources/config/application.yaml @@ -7,7 +7,7 @@ spring: password: ${MALL_MYSQL_PASSWORD} # mybatis -mybatis: +mybatis-plus: config-location: classpath:mybatis-config.xml mapper-locations: classpath:mapper/*.xml type-aliases-package: cn.iocoder.mall.pay.biz.dataobject diff --git a/pom.xml b/pom.xml index 5e924ee3..373f2a96 100644 --- a/pom.xml +++ b/pom.xml @@ -51,6 +51,7 @@ 1.16.14 7.2.18 + 6.1.0 2.5 @@ -58,11 +59,13 @@ 1.8 + 6.0.16.Final + 1.2.56 - + org.springframework.boot spring-boot-starter @@ -202,6 +205,12 @@ + + org.apache.skywalking + apm-toolkit-trace + ${skywalking.version} + + de.codecentric spring-boot-admin-starter-client @@ -210,6 +219,8 @@ + + org.mapstruct @@ -234,6 +245,29 @@ ${guava.version} + + com.fasterxml.jackson.core + jackson-annotations + ${jackson.version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson.version} + + + + org.hibernate + hibernate-validator + ${hibernate-validator.version} + + + + com.alibaba + fastjson + ${fastjson.version} + + diff --git a/search/search-application/pom.xml b/search/search-application/pom.xml index 095f3be8..243e92ae 100644 --- a/search/search-application/pom.xml +++ b/search/search-application/pom.xml @@ -12,6 +12,7 @@ search-application + cn.iocoder.mall common-framework @@ -43,16 +44,12 @@ 1.0-SNAPSHOT + org.springframework.boot spring-boot-starter-web - - org.apache.curator - curator-framework - - io.springfox springfox-swagger2 @@ -62,6 +59,7 @@ swagger-bootstrap-ui + org.springframework.boot spring-boot-starter-test diff --git a/search/search-service-api/pom.xml b/search/search-service-api/pom.xml index 7bfb59ff..c6b73651 100644 --- a/search/search-service-api/pom.xml +++ b/search/search-service-api/pom.xml @@ -12,17 +12,14 @@ search-service-api + cn.iocoder.mall common-framework 1.0-SNAPSHOT - - javax.validation - validation-api - - + org.mapstruct mapstruct @@ -31,6 +28,7 @@ org.mapstruct mapstruct-jdk8 + org.projectlombok lombok diff --git a/search/search-service-impl/pom.xml b/search/search-service-impl/pom.xml index 4c26c32a..4feb2769 100644 --- a/search/search-service-impl/pom.xml +++ b/search/search-service-impl/pom.xml @@ -12,6 +12,7 @@ search-service-impl + cn.iocoder.mall search-service-api @@ -28,10 +29,23 @@ 1.0-SNAPSHOT + + + org.springframework.boot + spring-boot-starter-data-elasticsearch + + + org.apache.dubbo dubbo + + org.apache.dubbo + dubbo-spring-boot-starter + + + org.apache.curator curator-framework @@ -40,36 +54,25 @@ org.apache.curator curator-recipes - - org.apache.dubbo - dubbo-spring-boot-starter - - - - com.google.guava - guava - - - - org.springframework.boot - spring-boot-starter-data-elasticsearch - + org.apache.rocketmq rocketmq-spring-boot-starter + + + com.google.guava + guava + + org.springframework.boot spring-boot-starter-test test - - - - org.apache.curator curator-framework