- [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of
this repository and believe that this is not a duplicate.
- [ ] I have checked the
[FAQ](https://github.com/apache/dubbo/blob/master/FAQ.md) of this repository
and believe that this is not a duplicate.
### Environment
* Dubbo version: 2.7.3
* Operating System version: mac
* Java version: jdk 8
### Steps to reproduce this issue
注册了两个配置中心,一个用的是dubbo默认配置
```
dubbo.registry.address=zookeeper://127.0.0.1:2181
```
然后自定一个注册中心:
```java
@Bean
public RegistryConfig ecareConsumerConfig() {
RegistryConfig registryConfig = new RegistryConfig();
registryConfig.setAddress("zookeeper://127.0.0.1:2182");
registryConfig.setGroup("dubbo");
return registryConfig;
}
```
引用时,指定了注册中心`ecareConsumerConfig`
```java
@Reference(registry = "ecareConsumerConfig")
private UserInfoApiService userInfoApiService;
```
然后程序启动解析时,源码走到`org.apache.dubbo.config.ReferenceConfig.init()`里面注册信息都是`127.0.0.1:2182`,继续走,当走到`startConfigCenter`里面调用了`ConfigManager.getInstance().refreshAll();`里面的`AbstractConfig.refresh()`不管你是否拥有值,都将里面的值覆盖掉,变成`zookeeper://127.0.0.1:2181`。导致注册中心找错
Pls. provide [GitHub address] to reproduce this issue.
### Expected Result
What do you expected from the above steps?
### Actual Result
What actually happens?
If there is an exception, please attach the exception trace:
```
Just put your stack trace here!
```
[ Full content available at: https://github.com/apache/dubbo/issues/5224 ]
This message was relayed via gitbox.apache.org for
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]