pinxiong opened a new issue #9070: URL: https://github.com/apache/dubbo/issues/9070
<!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy --> - [x] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate. ### Environment * Dubbo version: `3.0` * Operating System version: `Mac OS` * Java version: `1.8` ### Expected Behavior The returned URL contains `scopeModel` parameter ### Actual Behavior Return the URL without `scopeModel` after setting. See [ConfigCenterConfig](https://github.com/apache/dubbo/blob/3.0/dubbo-common/src/main/java/org/apache/dubbo/config/ConfigCenterConfig.java#L153) ```java public URL toUrl() { Map<String, String> map = new HashMap<>(); appendParameters(map, this); if (StringUtils.isEmpty(address)) { address = ANYHOST_VALUE; } map.put(PATH_KEY, ConfigCenterConfig.class.getSimpleName()); // use 'zookeeper' as the default config center. if (StringUtils.isEmpty(map.get(PROTOCOL_KEY))) { map.put(PROTOCOL_KEY, ZOOKEEPER_PROTOCOL); } URL url = UrlUtils.parseURL(address, map); // NOTE: URL#setScopeModel will create a new URL instance // It's invalid if we want to return the URL with scopeModel parameter // or it's unnecessary code url.setScopeModel(getScopeModel()); return url; } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
