diff --git a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-springcloud/src/main/java/org/apache/shenyu/plugin/springcloud/handler/SpringCloudPluginDataHandler.java b/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-springcloud/src/main/java/org/apache/shenyu/plugin/springcloud/handler/SpringCloudPluginDataHandler.java index df3215c613be..15734757987c 100644 --- a/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-springcloud/src/main/java/org/apache/shenyu/plugin/springcloud/handler/SpringCloudPluginDataHandler.java +++ b/shenyu-plugin/shenyu-plugin-proxy/shenyu-plugin-springcloud/src/main/java/org/apache/shenyu/plugin/springcloud/handler/SpringCloudPluginDataHandler.java @@ -66,6 +66,10 @@ public class SpringCloudPluginDataHandler implements PluginDataHandler { private static final Logger LOG = LoggerFactory.getLogger(SpringCloudPluginDataHandler.class); + private static final String NAMESPACE = "nacosNameSpace"; + + private static final String GROUP = "groupName"; + private final ShenyuConfig.SpringCloudCacheConfig springCloudCacheConfig; private final Environment env; @@ -192,7 +196,8 @@ private void readYmlBuildRepository() { final String serverLists = env.getProperty("spring.cloud.nacos.discovery.server-addr"); final String prefix = "spring.cloud.nacos.discovery."; Properties properties = new Properties(); - properties.put(PropertyKeyConst.NAMESPACE, env.getProperty(prefix + PropertyKeyConst.NAMESPACE)); + properties.put(NAMESPACE, env.getProperty(prefix + PropertyKeyConst.NAMESPACE)); + properties.put(GROUP, env.getProperty(prefix + "group")); if (env.getProperty(prefix + PropertyKeyConst.USERNAME) != null) { properties.put(PropertyKeyConst.USERNAME, env.getProperty(prefix + PropertyKeyConst.USERNAME)); }