MorganYoung opened a new issue #8237:
URL: https://github.com/apache/dubbo/issues/8237


   - [ ] 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: 3.0.0
   
   
   ### Steps to reproduce this issue
   
   1. dubbo config-center 相关yml配置如下
   ```
   dubbo:
     ...
     config-center:
       address: nacos://xxxx:8848
       username: someusername
       password: xxxx
   ```
   
   2. 在执行 org.apache.dubbo.config.bootstrap.DubboBootstrap#startConfigCenter 
方法时会调用 configCenterConfig.refresh(); 方法。
   3. setAddress方法,会覆盖已经设置过的username和password
   
   ```
   public void setAddress(String address) {
           this.address = address;
           if (address != null) {
               try {
                   URL url = URL.valueOf(address);
                   setUsername(url.getUsername());
                   setPassword(url.getPassword());
                   updateIdIfAbsent(url.getProtocol());
                   updateProtocolIfAbsent(url.getProtocol());
                   updatePortIfAbsent(url.getPort());
                   updateParameters(url.getParameters());
               } catch (Exception ignored) {
               }
           }
       }
   ```
   
   ### Expected Result
   
   希望设置前先判断是否已经设置过相关属性值
   
   
   


-- 
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]

Reply via email to