From 7e86704fdb6f32865e67dcb2d0f08aae200495e0 Mon Sep 17 00:00:00 2001 From: Administrator Date: Thu, 5 Nov 2020 01:13:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=BA=86parent=E5=B7=A5?= =?UTF-8?q?=E7=A8=8B=E7=9A=84pom=E6=96=87=E4=BB=B6=EF=BC=8C=20=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=E4=BA=86=E5=85=AC=E5=8F=B8=E4=BB=93=E5=BA=93=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../starter/FeignStarterConfiguration.java | 21 -- mall-ebtp-cloud-jpa-starter/pom.xml | 8 +- .../mall-ebtp-cloud-common/pom.xml | 66 ------- .../mall/cloud/common/utils/JsonUtils.java | 97 ---------- .../ebtp/mall/cloud/common/AppTest.java | 38 ---- mall-ebtp-cloud-log-starter/pom.xml | 20 +- mall-ebtp-cloud-parent/pom.xml | 182 ++---------------- mall-ebtp-cloud-swagger-starter/pom.xml | 30 +-- pom.xml | 27 ++- uboot-eureka/.gitignore | 33 ---- uboot-eureka/pom.xml | 35 ---- .../ubooteureka/UbootEurekaApplication.java | 15 -- .../src/main/resources/application.yml | 14 -- .../UbootEurekaApplicationTests.java | 13 -- 14 files changed, 40 insertions(+), 559 deletions(-) delete mode 100644 mall-ebtp-cloud-libs/mall-ebtp-cloud-common/pom.xml delete mode 100644 mall-ebtp-cloud-libs/mall-ebtp-cloud-common/src/main/java/com/chinaunicom/ebtp/mall/cloud/common/utils/JsonUtils.java delete mode 100644 mall-ebtp-cloud-libs/mall-ebtp-cloud-common/src/test/java/om/chinaunicom/ebtp/mall/cloud/common/AppTest.java delete mode 100644 uboot-eureka/.gitignore delete mode 100644 uboot-eureka/pom.xml delete mode 100644 uboot-eureka/src/main/java/com/chinaunicom/ebtp/ubooteureka/UbootEurekaApplication.java delete mode 100644 uboot-eureka/src/main/resources/application.yml delete mode 100644 uboot-eureka/src/test/java/com/chinaunicom/ebtp/ubooteureka/UbootEurekaApplicationTests.java diff --git a/mall-ebtp-cloud-feign-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/feign/starter/FeignStarterConfiguration.java b/mall-ebtp-cloud-feign-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/feign/starter/FeignStarterConfiguration.java index 3378578..89a34bc 100644 --- a/mall-ebtp-cloud-feign-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/feign/starter/FeignStarterConfiguration.java +++ b/mall-ebtp-cloud-feign-starter/src/main/java/com/chinaunicom/mall/ebtp/cloud/feign/starter/FeignStarterConfiguration.java @@ -1,31 +1,10 @@ package com.chinaunicom.mall.ebtp.cloud.feign.starter; -import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; -import org.springframework.cloud.openfeign.EnableFeignClients; -import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.PropertySource; -import feign.RequestInterceptor; -import feign.okhttp.OkHttpClient; - @Configuration -@EnableFeignClients(basePackages = "com.chinaunicom.mall.ebtp") @PropertySource("classpath:feign-configuration.properties") public class FeignStarterConfiguration { - @Bean - public OkHttpClient client() { - return new OkHttpClient(); - } - - @Bean - @ConditionalOnMissingBean(RequestInterceptor.class) - public RequestInterceptor requestInterceptor() { - return requestTemplate -> { - requestTemplate.header("user", "mall"); - requestTemplate.header("password", "mall"); - }; - } - } diff --git a/mall-ebtp-cloud-jpa-starter/pom.xml b/mall-ebtp-cloud-jpa-starter/pom.xml index 8bdecda..5e3d2e9 100644 --- a/mall-ebtp-cloud-jpa-starter/pom.xml +++ b/mall-ebtp-cloud-jpa-starter/pom.xml @@ -20,9 +20,9 @@ com.baomidou mybatis-plus-boot-starter - - com.alibaba - druid - + + com.alibaba + druid-spring-boot-starter + diff --git a/mall-ebtp-cloud-libs/mall-ebtp-cloud-common/pom.xml b/mall-ebtp-cloud-libs/mall-ebtp-cloud-common/pom.xml deleted file mode 100644 index 9091e46..0000000 --- a/mall-ebtp-cloud-libs/mall-ebtp-cloud-common/pom.xml +++ /dev/null @@ -1,66 +0,0 @@ - - 4.0.0 - - com.chinaunicom.ebtp - mall-ebtp-cloud-common - 0.0.1 - jar - - mall-ebtp-cloud-common - - - 1.8 - @ - ${java.version} - ${java.version} - UTF-8 - UTF-8 - - - - - cn.hutool - hutool-all - 5.4.1 - - - com.fasterxml.jackson.module - jackson-module-parameter-names - 2.12.0-rc1 - - - com.fasterxml.jackson.datatype - jackson-datatype-jdk8 - 2.12.0-rc1 - - - com.fasterxml.jackson.datatype - jackson-datatype-jsr310 - 2.12.0-rc1 - - - org.projectlombok - lombok - 1.18.12 - - - org.slf4j - slf4j-api - 1.7.25 - - - org.slf4j - slf4j-log4j12 - 1.7.25 - - - junit - junit - 3.8.1 - test - - - - diff --git a/mall-ebtp-cloud-libs/mall-ebtp-cloud-common/src/main/java/com/chinaunicom/ebtp/mall/cloud/common/utils/JsonUtils.java b/mall-ebtp-cloud-libs/mall-ebtp-cloud-common/src/main/java/com/chinaunicom/ebtp/mall/cloud/common/utils/JsonUtils.java deleted file mode 100644 index 218be88..0000000 --- a/mall-ebtp-cloud-libs/mall-ebtp-cloud-common/src/main/java/com/chinaunicom/ebtp/mall/cloud/common/utils/JsonUtils.java +++ /dev/null @@ -1,97 +0,0 @@ -package com.chinaunicom.ebtp.mall.cloud.common.utils; - -import java.util.List; - -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; -import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; -import com.fasterxml.jackson.module.paramnames.ParameterNamesModule; - -import cn.hutool.core.exceptions.ExceptionUtil; -import com.fasterxml.jackson.databind.JavaType; -import lombok.extern.slf4j.Slf4j; - -/** - * json util - * - * @author 付庆吉 - * @date 2020-09-16 - */ -@Slf4j -public class JsonUtils { - - private static final ObjectMapper MAPPER = new ObjectMapper(); - - /** - * 将对象转换成json字符串。 - *

Title: pojoToJson

- *

Description:

- * - * @param data - * @return - */ - public static String objectToJson(Object data) { - try { - MAPPER.registerModule(new ParameterNamesModule()) - .registerModule(new Jdk8Module()) - .registerModule(new JavaTimeModule()); - return MAPPER.writeValueAsString(data); - } catch (JsonProcessingException e) { - log.info(ExceptionUtil.stacktraceToString(e)); - } - return null; - } - - /** - * 将json结果集转化为对象 - * - * @param jsonData json数据 - * @param beanType 对象中的object类型 - * @return - */ - public static T jsonToPojo(String jsonData, Class beanType) { - try { - return MAPPER.readValue(jsonData, beanType); - } catch (Exception e) { - log.info(ExceptionUtil.stacktraceToString(e)); - } - return null; - } - - /** - * 将json数据转换成pojo对象list - *

Title: jsonToList

- *

Description:

- * - * @param jsonData - * @param beanType - * @return - */ - public static List jsonToList(String jsonData, Class beanType) { - JavaType javaType = MAPPER.getTypeFactory().constructParametricType(List.class, beanType); - try { - List list = MAPPER.readValue(jsonData, javaType); - return list; - } catch (Exception e) { - log.info(ExceptionUtil.stacktraceToString(e)); - } - return null; - } - - /** - * 将List转为List - *

Title: jsonToList

- *

Description:

- * - * @param jsonData - * @param beanType - * @return - */ - public static List jsonToList(List jsonData, Class beanType) { - String str = objectToJson(jsonData); - - return jsonToList(str,beanType); - } - -} diff --git a/mall-ebtp-cloud-libs/mall-ebtp-cloud-common/src/test/java/om/chinaunicom/ebtp/mall/cloud/common/AppTest.java b/mall-ebtp-cloud-libs/mall-ebtp-cloud-common/src/test/java/om/chinaunicom/ebtp/mall/cloud/common/AppTest.java deleted file mode 100644 index a9557e8..0000000 --- a/mall-ebtp-cloud-libs/mall-ebtp-cloud-common/src/test/java/om/chinaunicom/ebtp/mall/cloud/common/AppTest.java +++ /dev/null @@ -1,38 +0,0 @@ -package om.chinaunicom.ebtp.mall.cloud.common; - -import junit.framework.Test; -import junit.framework.TestCase; -import junit.framework.TestSuite; - -/** - * Unit test for simple App. - */ -public class AppTest - extends TestCase -{ - /** - * Create the test case - * - * @param testName name of the test case - */ - public AppTest( String testName ) - { - super( testName ); - } - - /** - * @return the suite of tests being tested - */ - public static Test suite() - { - return new TestSuite( AppTest.class ); - } - - /** - * Rigourous Test :-) - */ - public void testApp() - { - assertTrue( true ); - } -} diff --git a/mall-ebtp-cloud-log-starter/pom.xml b/mall-ebtp-cloud-log-starter/pom.xml index 33c42a4..42d550b 100644 --- a/mall-ebtp-cloud-log-starter/pom.xml +++ b/mall-ebtp-cloud-log-starter/pom.xml @@ -19,15 +19,15 @@ UTF-8 - - - org.apache.skywalking - apm-toolkit-logback-1.x - - - - org.apache.skywalking - apm-toolkit-trace - + + + org.apache.skywalking + apm-toolkit-logback-1.x + + + + org.apache.skywalking + apm-toolkit-trace + diff --git a/mall-ebtp-cloud-parent/pom.xml b/mall-ebtp-cloud-parent/pom.xml index f99136f..dbf49e7 100644 --- a/mall-ebtp-cloud-parent/pom.xml +++ b/mall-ebtp-cloud-parent/pom.xml @@ -16,7 +16,6 @@ http://maven.apache.org - 0.0.1 2.6.0-SNAPSHOT 3.2.0 1.5.21 @@ -177,175 +176,18 @@ - cn.chinaunicom.sdsi - mall-core - ${sdsi-mall-core-version} - - - cn.chinaunicom.sdsi - chinaunicom-excelutils - - - cn.chinaunicom.sdsi - unifast-security - - - cn.chinaunicom.sdsi - unifast-storage - - - org.springframework.boot - spring-boot-starter - - - org.springframework.boot - spring-boot-starter-cache - - - org.springframework.boot - spring-boot-starter-data-redis - - - redis.clients - jedis - - - org.springframework.cloud - spring-cloud-starter-openfeign - - - org.springframework.cloud - spring-cloud-security - - - org.springframework.cloud - spring-cloud-starter-oauth2 - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-aop - - - org.springframework.kafka - spring-kafka - - - com.baomidou - mybatis-plus-boot-starter - - - com.alibaba - druid - - - io.springfox - springfox-swagger2 - - - io.swagger - swagger-annotations - - - io.swagger - swagger-models - - - io.springfox - springfox-swagger-ui - - - io.github.swagger2markup - swagger2markup - - - org.freemarker - freemarker - - - com.google.guava - guava - - - org.apache.shardingsphere - sharding-jdbc-spring-boot-starter - - - org.apache.poi - poi - - - org.apache.poi - poi-ooxml - - - org.apache.poi - poi-ooxml-schemas - - - mysql - mysql-connector-java - - - com.google.code.gson - gson - - - org.springframework.security.oauth - spring-security-oauth2 - - - com.sun.jersey - jersey-client - - - net.sf.json-lib - json-lib - - - commons-fileupload - commons-fileupload - - - org.aspectj - aspectjweaver - - - org.aspectj - aspectjrt - - - cn.hutool - hutool-all - - - org.hibernate.validator - hibernate-validator - - - org.springframework.boot - spring-boot-configuration-processor - - - org.apache.commons - commons-lang3 - - - org.apache.skywalking - apm-toolkit-logback-1.x - - - org.apache.skywalking - apm-toolkit-trace - - + org.springframework.boot + spring-boot-starter + provided - com.chinaunicom.ebtp - mall-ebtp-cloud-common + org.springframework.boot + spring-boot-starter-test + test + + + org.projectlombok + lombok @@ -356,10 +198,10 @@ Nexus Snapshot Repository http://192.168.30.126:31233/repository/eshop-grouppath-45c07c6e-maven-group/ - true + false - true + false diff --git a/mall-ebtp-cloud-swagger-starter/pom.xml b/mall-ebtp-cloud-swagger-starter/pom.xml index c7c73d4..0ddd8c3 100644 --- a/mall-ebtp-cloud-swagger-starter/pom.xml +++ b/mall-ebtp-cloud-swagger-starter/pom.xml @@ -8,6 +8,7 @@ com.chinaunicom.ebtp mall-ebtp-cloud-parent 0.0.1 + com.chinaunicom.ebtp mall-ebtp-cloud-swagger-starter @@ -39,33 +40,4 @@ - - - - repo_group_seal - Nexus Snapshot Repository - http://192.168.30.126:31233/repository/eshop-grouppath-45c07c6e-maven-group/ - - true - - - true - - - - - ettp_group_public - ettp_group_public - http://zentao.jlcucc.com:60000/repository/ettp-public/ - - - - aliyun-repos - https://maven.aliyun.com/repository/public - - false - - - - diff --git a/pom.xml b/pom.xml index c342cd6..26a105b 100644 --- a/pom.xml +++ b/pom.xml @@ -26,6 +26,7 @@ UTF-8 UTF-8 Hoxton.SR7 + 2.2.3.RELEASE 3.2.0 @@ -38,6 +39,18 @@ pom import + + com.alibaba.cloud + spring-cloud-alibaba-dependencies + ${com.alibaba.cloud.version} + pom + import + + + com.alibaba + druid-spring-boot-starter + 1.1.17 + com.ctrip.framework.apollo apollo-client @@ -98,11 +111,6 @@ mall-ebtp-cloud-feign-starter 0.0.1 - - com.chinaunicom.ebtp - mall-ebtp-cloud-common - 0.0.1 - com.chinaunicom.ebtp mall-ebtp-cloud-seata-starter @@ -111,14 +119,6 @@ - - - nexus-aliyun - Nexus aliyun - http://maven.aliyun.com/nexus/content/groups/public - - - @@ -290,7 +290,6 @@ mall-ebtp-cloud-parent - uboot-eureka mall-ebtp-cloud-mvc-starter mall-ebtp-cloud-eureka-starter mall-ebtp-cloud-apollo-starter diff --git a/uboot-eureka/.gitignore b/uboot-eureka/.gitignore deleted file mode 100644 index 549e00a..0000000 --- a/uboot-eureka/.gitignore +++ /dev/null @@ -1,33 +0,0 @@ -HELP.md -target/ -!.mvn/wrapper/maven-wrapper.jar -!**/src/main/**/target/ -!**/src/test/**/target/ - -### STS ### -.apt_generated -.classpath -.factorypath -.project -.settings -.springBeans -.sts4-cache - -### IntelliJ IDEA ### -.idea -*.iws -*.iml -*.ipr - -### NetBeans ### -/nbproject/private/ -/nbbuild/ -/dist/ -/nbdist/ -/.nb-gradle/ -build/ -!**/src/main/**/build/ -!**/src/test/**/build/ - -### VS Code ### -.vscode/ diff --git a/uboot-eureka/pom.xml b/uboot-eureka/pom.xml deleted file mode 100644 index b745d39..0000000 --- a/uboot-eureka/pom.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - 4.0.0 - - com.chinaunicom.ebtp - mall-ebtp-cloud - 0.0.1 - - - com.chinaunicom.ebtp - uboot-eureka - 0.0.1 - uboot-eureka - - - - org.springframework.cloud - spring-cloud-starter-netflix-eureka-server - - - - org.springframework.boot - spring-boot-starter-test - test - - - org.junit.vintage - junit-vintage-engine - - - - - - diff --git a/uboot-eureka/src/main/java/com/chinaunicom/ebtp/ubooteureka/UbootEurekaApplication.java b/uboot-eureka/src/main/java/com/chinaunicom/ebtp/ubooteureka/UbootEurekaApplication.java deleted file mode 100644 index 549af0b..0000000 --- a/uboot-eureka/src/main/java/com/chinaunicom/ebtp/ubooteureka/UbootEurekaApplication.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.chinaunicom.ebtp.ubooteureka; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; - -@EnableEurekaServer -@SpringBootApplication -public class UbootEurekaApplication { - - public static void main(String[] args) { - SpringApplication.run(UbootEurekaApplication.class, args); - } - -} diff --git a/uboot-eureka/src/main/resources/application.yml b/uboot-eureka/src/main/resources/application.yml deleted file mode 100644 index 32098cf..0000000 --- a/uboot-eureka/src/main/resources/application.yml +++ /dev/null @@ -1,14 +0,0 @@ -server: - port: 8761 #指定该Eureka实例的端口 - spring: - application: - name: uboot-eureka - -eureka: - instance: - hostname: localhost #设置当前实例的主机名称 - client: - registerWithEureka: false #禁止注册自身 - fetchRegistry: false #因为该服务没有注册到其他注册中心,所以关闭从注册中心拉取服务列表。 - serviceUrl: #服务注册中心地址 - defaultZone: http://${eureka.instance.hostname}:${server.port}/eurek diff --git a/uboot-eureka/src/test/java/com/chinaunicom/ebtp/ubooteureka/UbootEurekaApplicationTests.java b/uboot-eureka/src/test/java/com/chinaunicom/ebtp/ubooteureka/UbootEurekaApplicationTests.java deleted file mode 100644 index 8c07b59..0000000 --- a/uboot-eureka/src/test/java/com/chinaunicom/ebtp/ubooteureka/UbootEurekaApplicationTests.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.chinaunicom.ebtp.ubooteureka; - -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -@SpringBootTest -class UbootEurekaApplicationTests { - - @Test - void contextLoads() { - } - -}