Skip to content

Commit

Permalink
use the correct spi ZookeeperTransporter when initialize the default …
Browse files Browse the repository at this point in the history
…ConfigCenter's zkClient(#4511)
  • Loading branch information
CodingSinger committed Jul 9, 2019
1 parent 519df67 commit b52730f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ public class ConfigCenterConfig extends AbstractConfig {
*/
private Map<String, String> parameters;

/*
* as same as org.apache.dubbo.config.RegistryConfig.client
*/
private String client;

public ConfigCenterConfig() {
}

Expand Down Expand Up @@ -228,6 +233,14 @@ public void setParameters(Map<String, String> parameters) {
this.parameters = parameters;
}

public String getClient() {
return client;
}

public void setClient(String client) {
this.client = client;
}

@Override
@Parameter(excluded = true)
public boolean isValid() {
Expand Down

0 comments on commit b52730f

Please sign in to comment.