diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractInterfaceConfig.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractInterfaceConfig.java index b72560897cd4..67dc74bb29cc 100644 --- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractInterfaceConfig.java +++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractInterfaceConfig.java @@ -619,6 +619,7 @@ private void useRegistryForConfigIfNecessary() { Environment.getInstance().getDynamicConfiguration().orElseGet(() -> { ConfigManager configManager = ConfigManager.getInstance(); ConfigCenterConfig cc = configManager.getConfigCenter().orElse(new ConfigCenterConfig()); + cc.setClient(rc.getClient()); cc.setProtocol(rc.getProtocol()); cc.setAddress(rc.getAddress()); cc.setHighestPriority(false); diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ConfigCenterConfig.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ConfigCenterConfig.java index 7caae5634ecf..bbad034f42b2 100644 --- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ConfigCenterConfig.java +++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ConfigCenterConfig.java @@ -86,6 +86,11 @@ public class ConfigCenterConfig extends AbstractConfig { */ private Map parameters; + /* + * as same as org.apache.dubbo.config.RegistryConfig.client + */ + private String client; + public ConfigCenterConfig() { } @@ -228,6 +233,14 @@ public void setParameters(Map parameters) { this.parameters = parameters; } + public String getClient() { + return client; + } + + public void setClient(String client) { + this.client = client; + } + @Override @Parameter(excluded = true) public boolean isValid() {