From 95c577f2a53ab868e847fecb0df67495bc826e50 Mon Sep 17 00:00:00 2001 From: tanghc Date: Wed, 20 Nov 2019 20:10:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BD=91=E5=85=B3serviceId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/gitee/sop/adminserver/service/ConfigPushService.java | 2 +- .../sop/gatewaycommon/manager/AbstractConfiguration.java | 4 ++-- .../gitee/sop/gatewaycommon/route/BaseRegistryListener.java | 2 +- sop-gateway/pom.xml | 5 ----- sop-gateway/src/main/resources/application-dev.properties | 2 +- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/service/ConfigPushService.java b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/service/ConfigPushService.java index efd8604c..d5f2d023 100644 --- a/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/service/ConfigPushService.java +++ b/sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/service/ConfigPushService.java @@ -30,7 +30,7 @@ import java.util.stream.Stream; public class ConfigPushService { private static final String GATEWAY_PUSH_URL = "http://%s/configChannelMsg"; - private static final String API_GATEWAY_SERVICE_ID = "api-gateway"; + private static final String API_GATEWAY_SERVICE_ID = "sop-gateway"; private static HttpTool httpTool = new HttpTool(); diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/manager/AbstractConfiguration.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/manager/AbstractConfiguration.java index e9edb014..c8b8845a 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/manager/AbstractConfiguration.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/manager/AbstractConfiguration.java @@ -185,8 +185,8 @@ public class AbstractConfiguration implements ApplicationContextAware { throw new IllegalArgumentException("RouteRepositoryContext.setRouteRepository()方法未使用"); } String serverName = EnvironmentKeys.SPRING_APPLICATION_NAME.getValue(); - if (!"api-gateway".equals(serverName)) { - throw new IllegalArgumentException("spring.application.name必须为api-gateway"); + if (!"sop-gateway".equals(serverName)) { + throw new IllegalArgumentException("spring.application.name必须为sop-gateway"); } String urlencode = EnvironmentKeys.SIGN_URLENCODE.getValue(); if ("true".equals(urlencode)) { diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/route/BaseRegistryListener.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/route/BaseRegistryListener.java index 54fa268a..5fc35061 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/route/BaseRegistryListener.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/route/BaseRegistryListener.java @@ -22,7 +22,7 @@ public abstract class BaseRegistryListener implements RegistryListener { public static List EXCLUDE_SERVICE_ID_LIST = new ArrayList<>(8); static { - EXCLUDE_SERVICE_ID_LIST.add("api-gateway"); + EXCLUDE_SERVICE_ID_LIST.add("sop-gateway"); EXCLUDE_SERVICE_ID_LIST.add("website-server"); } diff --git a/sop-gateway/pom.xml b/sop-gateway/pom.xml index f52c0069..078d768c 100644 --- a/sop-gateway/pom.xml +++ b/sop-gateway/pom.xml @@ -54,11 +54,6 @@ runtime - - org.springframework.cloud - spring-cloud-starter-netflix-zuul - -