<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.2</li>
<li>Operating System version: macOS 10.12.6</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">What do you expected from the above steps？</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
    ZookeeperDynamicConfiguration(URL url, ZookeeperTransporter zookeeperTransporter) {
        this.url = url;
        rootPath = &quot;/&quot; + url.getParameter(CONFIG_NAMESPACE_KEY, DEFAULT_GROUP) + &quot;/config&quot;;

        initializedLatch = new CountDownLatch(1);
        this.cacheListener = new CacheListener(rootPath, initializedLatch);
        this.executor = Executors.newFixedThreadPool(1, new NamedThreadFactory(this.getClass().getSimpleName(), true));

        zkClient = zookeeperTransporter.connect(url);
        zkClient.addDataListener(rootPath, cacheListener, executor);
        try {
            // Wait for connection
            this.initializedLatch.await();
        } catch (InterruptedException e) {
            logger.warn(&quot;Failed to build local cache for config center (zookeeper).&quot; + url);
        }
    }"><pre class="notranslate">    <span class="pl-en">ZookeeperDynamicConfiguration</span>(<span class="pl-smi">URL</span> <span class="pl-s1">url</span>, <span class="pl-smi">ZookeeperTransporter</span> <span class="pl-s1">zookeeperTransporter</span>) {
        <span class="pl-smi">this</span>.<span class="pl-s1">url</span> = <span class="pl-s1">url</span>;
        <span class="pl-s1">rootPath</span> = <span class="pl-s">"/"</span> + <span class="pl-s1">url</span>.<span class="pl-en">getParameter</span>(<span class="pl-c1">CONFIG_NAMESPACE_KEY</span>, <span class="pl-c1">DEFAULT_GROUP</span>) + <span class="pl-s">"/config"</span>;

        <span class="pl-s1">initializedLatch</span> = <span class="pl-k">new</span> <span class="pl-smi">CountDownLatch</span>(<span class="pl-c1">1</span>);
        <span class="pl-smi">this</span>.<span class="pl-s1">cacheListener</span> = <span class="pl-k">new</span> <span class="pl-smi">CacheListener</span>(<span class="pl-s1">rootPath</span>, <span class="pl-s1">initializedLatch</span>);
        <span class="pl-smi">this</span>.<span class="pl-s1">executor</span> = <span class="pl-smi">Executors</span>.<span class="pl-en">newFixedThreadPool</span>(<span class="pl-c1">1</span>, <span class="pl-k">new</span> <span class="pl-smi">NamedThreadFactory</span>(<span class="pl-smi">this</span>.<span class="pl-en">getClass</span>().<span class="pl-en">getSimpleName</span>(), <span class="pl-c1">true</span>));

        <span class="pl-s1">zkClient</span> = <span class="pl-s1">zookeeperTransporter</span>.<span class="pl-en">connect</span>(<span class="pl-s1">url</span>);
        <span class="pl-s1">zkClient</span>.<span class="pl-en">addDataListener</span>(<span class="pl-s1">rootPath</span>, <span class="pl-s1">cacheListener</span>, <span class="pl-s1">executor</span>);
        <span class="pl-k">try</span> {
            <span class="pl-c">// Wait for connection</span>
            <span class="pl-smi">this</span>.<span class="pl-s1">initializedLatch</span>.<span class="pl-en">await</span>();
        } <span class="pl-k">catch</span> (<span class="pl-smi">InterruptedException</span> <span class="pl-s1">e</span>) {
            <span class="pl-s1">logger</span>.<span class="pl-en">warn</span>(<span class="pl-s">"Failed to build local cache for config center (zookeeper)."</span> + <span class="pl-s1">url</span>);
        }
    }</pre></div>
<p dir="auto"><code class="notranslate">        zkClient = zookeeperTransporter.connect(url);</code>会通过URL中的client参数来正确选择自适应扩展来初始化zk客户端。但在初始化配置中心的时候，URL是由ConfigCenterConfig得到的，此时URL中无client的信息，所以这个地方创建zk还是用的默认的zkClient。希望和注册中心时候一样获取自己扩展的zkClient</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">What actually happens?</p>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here!
</code></pre></div>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: xxx</li>
<li>Operating System version: xxx</li>
<li>Java version: xxx</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>xxx</li>
<li>xxx</li>
<li>xxx</li>
</ol>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">What do you expected from the above steps？</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">What actually happens?</p>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here!
</code></pre></div>