diff --git a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/manager/DefaultEnvGrayManager.java b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/manager/DefaultEnvGrayManager.java index 9e6df3be..abf3ae4f 100644 --- a/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/manager/DefaultEnvGrayManager.java +++ b/sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/manager/DefaultEnvGrayManager.java @@ -49,7 +49,7 @@ public class DefaultEnvGrayManager implements EnvGrayManager { } private ServiceGrayConfig getGrayConfig(String serviceId) { - if (serviceId == null) { + if (serviceId == null || !instanceIdServiceIdMap.containsValue(serviceId)) { return null; } return serviceGrayConfigMap.get(serviceId);