From 1b19b65d81fbdf970f7c5385c4325a8474211b27 Mon Sep 17 00:00:00 2001 From: tanghc Date: Wed, 17 Mar 2021 14:26:17 +0800 Subject: [PATCH 1/4] 4.3.0 --- doc/docs/files/10011_项目接入到SOP.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/docs/files/10011_项目接入到SOP.md b/doc/docs/files/10011_项目接入到SOP.md index 324e80f5..84f12f73 100644 --- a/doc/docs/files/10011_项目接入到SOP.md +++ b/doc/docs/files/10011_项目接入到SOP.md @@ -6,13 +6,12 @@ ```xml -2.1.8.RELEASE +2.3.2.RELEASE -Greenwich.SR6 +Hoxton.SR8 -2.1.2.RELEASE - +2.2.5.RELEASE ``` - pom.xml添加``控制版本 From db9a2f4e2337e97afc1da6dbc397dcd05b0e096b Mon Sep 17 00:00:00 2001 From: tanghc Date: Wed, 17 Mar 2021 14:50:36 +0800 Subject: [PATCH 2/4] 4.3.0 --- doc/docs/files/10011_项目接入到SOP.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/docs/files/10011_项目接入到SOP.md b/doc/docs/files/10011_项目接入到SOP.md index 84f12f73..e1138abc 100644 --- a/doc/docs/files/10011_项目接入到SOP.md +++ b/doc/docs/files/10011_项目接入到SOP.md @@ -93,6 +93,8 @@ public class OpenServiceConfig extends AlipayServiceConfiguration { php应用提供的接口需要返回如下json内容: +假设请求的接口为:`http://open.xxx.com/get_routes` + ```json { "serviceId": "goods-service", @@ -157,7 +159,7 @@ instance.setServiceName("goods-service"); instance.setIp("192.168.0.11"); instance.setPort(8080); // 在nacos的metadata中指定接口路径 -instance.getMetadata().put("sop.routes.path", "/goods/list_goods"); +instance.getMetadata().put("sop.routes.path", "http://open.xxx.com/get_routes"); namingService.registerInstance(serviceId, instance); ``` From de22c333d0d72b85d2501c71a19c9ff138c5934a Mon Sep 17 00:00:00 2001 From: tanghc Date: Wed, 17 Mar 2021 15:51:16 +0800 Subject: [PATCH 3/4] =?UTF-8?q?fix:serviceId=E5=A4=A7=E5=B0=8F=E5=86=99?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gatewaycommon/route/ServiceRouteListener.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/route/ServiceRouteListener.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/route/ServiceRouteListener.java index 68a1f07f..c029a1cc 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/route/ServiceRouteListener.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/route/ServiceRouteListener.java @@ -45,13 +45,25 @@ public class ServiceRouteListener extends BaseServiceListener { ResponseEntity responseEntity = getRestTemplate().getForEntity(url, String.class); if (responseEntity.getStatusCode() == HttpStatus.OK) { String body = responseEntity.getBody(); - ServiceRouteInfo serviceRouteInfo = JSON.parseObject(body, ServiceRouteInfo.class); + ServiceRouteInfo serviceRouteInfo; + try { + serviceRouteInfo = this.parseServiceRouteInfo(body); + } catch (Exception e) { + log.error("解析路由配置错误,body:{}", body, e); + return; + } gatewayRouteCache.load(serviceRouteInfo, callback -> routesProcessor.saveRoutes(serviceRouteInfo, instance)); } else { log.error("拉取路由配置异常,url: {}, status: {}, body: {}", url, responseEntity.getStatusCodeValue(), responseEntity.getBody()); } } + private ServiceRouteInfo parseServiceRouteInfo(String body) { + ServiceRouteInfo serviceRouteInfo = JSON.parseObject(body, ServiceRouteInfo.class); + serviceRouteInfo.setServiceId(serviceRouteInfo.getServiceId().toLowerCase()); + return serviceRouteInfo; + } + protected HttpEntity getHttpEntity() { HttpHeaders headers = new HttpHeaders(); return new HttpEntity<>(headers); From 7dccb19161a552fda3df6d585669a33f3625a77a Mon Sep 17 00:00:00 2001 From: tanghc Date: Wed, 17 Mar 2021 15:52:53 +0800 Subject: [PATCH 4/4] 4.3.1 --- changelog.md | 4 ++++ doc/pom.xml | 2 +- pom.xml | 2 +- sop-admin/pom.xml | 2 +- sop-admin/sop-admin-server/pom.xml | 4 ++-- sop-auth/pom.xml | 4 ++-- sop-common/pom.xml | 2 +- sop-common/sop-bridge-eureka/pom.xml | 2 +- sop-common/sop-bridge-nacos/pom.xml | 2 +- sop-common/sop-gateway-common/pom.xml | 2 +- sop-common/sop-service-common/pom.xml | 4 ++-- sop-example/pom.xml | 2 +- sop-example/sop-springmvc/pom.xml | 2 +- sop-example/sop-story/pom.xml | 2 +- sop-gateway/pom.xml | 2 +- sop-sdk/pom.xml | 2 +- sop-sdk/sdk-java/pom.xml | 4 ++-- sop-test/pom.xml | 2 +- sop-website/pom.xml | 2 +- sop-website/sop-website-server/pom.xml | 2 +- 20 files changed, 27 insertions(+), 23 deletions(-) diff --git a/changelog.md b/changelog.md index 69a2dd87..ca11c3c8 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,9 @@ # changelog +## 4.3.1 + +- 修复serviceId有大小写出现404问题 + ## 4.3.0 - 升级`spring-boot/spring-cloud/spring-cloud-alibaba`版本 diff --git a/doc/pom.xml b/doc/pom.xml index 390a58bb..6e5c1f3c 100644 --- a/doc/pom.xml +++ b/doc/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.gitee.sop doc - 4.3.0-SNAPSHOT + 4.3.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index 6fd51c7d..0a470e78 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ 4.0.0 com.gitee.sop sop-parent - 4.3.0-SNAPSHOT + 4.3.1-SNAPSHOT pom 一个开放平台解决方案项目,基于Spring Cloud实现,目标是能够让用户快速得搭建起自己的开放平台 diff --git a/sop-admin/pom.xml b/sop-admin/pom.xml index 94f7a905..fa9d4283 100644 --- a/sop-admin/pom.xml +++ b/sop-admin/pom.xml @@ -6,7 +6,7 @@ com.gitee.sop sop-parent - 4.3.0-SNAPSHOT + 4.3.1-SNAPSHOT ../pom.xml diff --git a/sop-admin/sop-admin-server/pom.xml b/sop-admin/sop-admin-server/pom.xml index e517a61c..61f81fc9 100644 --- a/sop-admin/sop-admin-server/pom.xml +++ b/sop-admin/sop-admin-server/pom.xml @@ -5,13 +5,13 @@ com.gitee.sop sop-parent - 4.3.0-SNAPSHOT + 4.3.1-SNAPSHOT ../../pom.xml 4.0.0 sop-admin-server - 4.3.0-SNAPSHOT + 4.3.1-SNAPSHOT jar diff --git a/sop-auth/pom.xml b/sop-auth/pom.xml index 6ddd9523..61862801 100644 --- a/sop-auth/pom.xml +++ b/sop-auth/pom.xml @@ -5,7 +5,7 @@ com.gitee.sop sop-parent - 4.3.0-SNAPSHOT + 4.3.1-SNAPSHOT ../pom.xml @@ -38,7 +38,7 @@ com.gitee.sop sdk-java - 4.3.0-SNAPSHOT + 4.3.1-SNAPSHOT diff --git a/sop-common/pom.xml b/sop-common/pom.xml index 5e6dd298..a986fd84 100644 --- a/sop-common/pom.xml +++ b/sop-common/pom.xml @@ -6,7 +6,7 @@ com.gitee.sop sop-parent - 4.3.0-SNAPSHOT + 4.3.1-SNAPSHOT ../pom.xml diff --git a/sop-common/sop-bridge-eureka/pom.xml b/sop-common/sop-bridge-eureka/pom.xml index 10384c7b..32e614b4 100644 --- a/sop-common/sop-bridge-eureka/pom.xml +++ b/sop-common/sop-bridge-eureka/pom.xml @@ -5,7 +5,7 @@ com.gitee.sop sop-common - 4.3.0-SNAPSHOT + 4.3.1-SNAPSHOT ../pom.xml 4.0.0 diff --git a/sop-common/sop-bridge-nacos/pom.xml b/sop-common/sop-bridge-nacos/pom.xml index b835dc56..f5f3d991 100644 --- a/sop-common/sop-bridge-nacos/pom.xml +++ b/sop-common/sop-bridge-nacos/pom.xml @@ -5,7 +5,7 @@ com.gitee.sop sop-common - 4.3.0-SNAPSHOT + 4.3.1-SNAPSHOT ../pom.xml 4.0.0 diff --git a/sop-common/sop-gateway-common/pom.xml b/sop-common/sop-gateway-common/pom.xml index ed9c6954..e83fd8ec 100644 --- a/sop-common/sop-gateway-common/pom.xml +++ b/sop-common/sop-gateway-common/pom.xml @@ -5,7 +5,7 @@ com.gitee.sop sop-common - 4.3.0-SNAPSHOT + 4.3.1-SNAPSHOT ../pom.xml diff --git a/sop-common/sop-service-common/pom.xml b/sop-common/sop-service-common/pom.xml index f9e1457d..b1441d0a 100644 --- a/sop-common/sop-service-common/pom.xml +++ b/sop-common/sop-service-common/pom.xml @@ -6,13 +6,13 @@ com.gitee.sop sop-common - 4.3.0-SNAPSHOT + 4.3.1-SNAPSHOT ../pom.xml 4.0.0 sop-service-common - 4.3.0-SNAPSHOT + 4.3.1-SNAPSHOT jar diff --git a/sop-example/pom.xml b/sop-example/pom.xml index 16e3096a..a9a58aef 100644 --- a/sop-example/pom.xml +++ b/sop-example/pom.xml @@ -5,7 +5,7 @@ com.gitee.sop sop-parent - 4.3.0-SNAPSHOT + 4.3.1-SNAPSHOT ../pom.xml diff --git a/sop-example/sop-springmvc/pom.xml b/sop-example/sop-springmvc/pom.xml index ded61da7..bc94f4eb 100644 --- a/sop-example/sop-springmvc/pom.xml +++ b/sop-example/sop-springmvc/pom.xml @@ -5,7 +5,7 @@ com.gitee.sop sop-parent - 4.3.0-SNAPSHOT + 4.3.1-SNAPSHOT ../../pom.xml diff --git a/sop-example/sop-story/pom.xml b/sop-example/sop-story/pom.xml index cac989d9..7c9fde05 100644 --- a/sop-example/sop-story/pom.xml +++ b/sop-example/sop-story/pom.xml @@ -4,7 +4,7 @@ com.gitee.sop sop-parent - 4.3.0-SNAPSHOT + 4.3.1-SNAPSHOT ../../pom.xml diff --git a/sop-gateway/pom.xml b/sop-gateway/pom.xml index dd1107d8..741e5fed 100644 --- a/sop-gateway/pom.xml +++ b/sop-gateway/pom.xml @@ -4,7 +4,7 @@ com.gitee.sop sop-parent - 4.3.0-SNAPSHOT + 4.3.1-SNAPSHOT ../pom.xml diff --git a/sop-sdk/pom.xml b/sop-sdk/pom.xml index db712537..bebee007 100644 --- a/sop-sdk/pom.xml +++ b/sop-sdk/pom.xml @@ -6,7 +6,7 @@ com.gitee.sop sop-parent - 4.3.0-SNAPSHOT + 4.3.1-SNAPSHOT ../pom.xml diff --git a/sop-sdk/sdk-java/pom.xml b/sop-sdk/sdk-java/pom.xml index 5ab7a493..924b9f76 100644 --- a/sop-sdk/sdk-java/pom.xml +++ b/sop-sdk/sdk-java/pom.xml @@ -4,13 +4,13 @@ com.gitee.sop sop-parent - 4.3.0-SNAPSHOT + 4.3.1-SNAPSHOT ../../pom.xml 4.0.0 sdk-java - 4.3.0-SNAPSHOT + 4.3.1-SNAPSHOT diff --git a/sop-test/pom.xml b/sop-test/pom.xml index 49510e22..f4aa0153 100644 --- a/sop-test/pom.xml +++ b/sop-test/pom.xml @@ -5,7 +5,7 @@ com.gitee.sop sop-parent - 4.3.0-SNAPSHOT + 4.3.1-SNAPSHOT ../pom.xml diff --git a/sop-website/pom.xml b/sop-website/pom.xml index b32ef7d1..17563bc3 100644 --- a/sop-website/pom.xml +++ b/sop-website/pom.xml @@ -6,7 +6,7 @@ com.gitee.sop sop-parent - 4.3.0-SNAPSHOT + 4.3.1-SNAPSHOT ../pom.xml diff --git a/sop-website/sop-website-server/pom.xml b/sop-website/sop-website-server/pom.xml index 3c199d82..566b2aad 100644 --- a/sop-website/sop-website-server/pom.xml +++ b/sop-website/sop-website-server/pom.xml @@ -5,7 +5,7 @@ com.gitee.sop sop-website - 4.3.0-SNAPSHOT + 4.3.1-SNAPSHOT ../pom.xml