<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.3</li>
<li>Operating System version: MacOs</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">This is not the issue, but the update of referenceCount log.</p>
<p dir="auto">Originally, i don't know why we have to check the referenceCount before close the connection.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="final class ReferenceCountExchangeClient implements ExchangeClient {
	@Override
	public void close(int timeout) {
	    if (referenceCount.decrementAndGet() &lt;= 0) {
	        if (timeout == 0) {
	            client.close();

	        } else {
	            client.close(timeout);
	        }

	        replaceWithLazyClient();
	    }
	}
}"><pre class="notranslate"><code class="notranslate">final class ReferenceCountExchangeClient implements ExchangeClient {
	@Override
	public void close(int timeout) {
	    if (referenceCount.decrementAndGet() &lt;= 0) {
	        if (timeout == 0) {
	            client.close();

	        } else {
	            client.close(timeout);
	        }

	        replaceWithLazyClient();
	    }
	}
}
</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: 2.7.2</li>
<li>Operating System version: Mac</li>
<li>Java version: 8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<h4 dir="auto">设置属性值</h4>
<ul dir="auto">
<li>Provider</li>
</ul>
<blockquote>
<p dir="auto">dubbo.provider.filter=metrics<br>
dubbo.provider.metrics.protocol=dubbo<br>
dubbo.provider.metrics.port=20880</p>
</blockquote>
<ul dir="auto">
<li>Consumer</li>
</ul>
<blockquote>
<p dir="auto">dubbo.consumer.filter=metrics<br>
dubbo.consumer.metrics.protocol=dubbo<br>
dubbo.consumer.metrics.port=20880</p>
</blockquote>
<p dir="auto">dubbo.provider会映射到<code class="notranslate">ProviderConfig</code>里的metrics，dubbo.consumer会映射到<code class="notranslate">ConsumerConfig</code>里的metrics。但是在<code class="notranslate">AbstractConfig</code>里解析时方法类型只能是<code class="notranslate">Primitive </code>，所以导致里面的值无法放入url 参数列表里。导致dubbo-admin里无法获取到protocol和port</p>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<blockquote>
<p dir="auto">为什么不跟xml<code class="notranslate">&lt;dubbo:metrics</code>一样提供<code class="notranslate">dubbo.metrics</code>，然后在<code class="notranslate">DubboConfigConfiguration</code>映射进去</p>
</blockquote>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="    @EnableDubboConfigBindings({
            @EnableDubboConfigBinding(prefix = &quot;dubbo.application&quot;, type = ApplicationConfig.class),
            @EnableDubboConfigBinding(prefix = &quot;dubbo.module&quot;, type = ModuleConfig.class),
            @EnableDubboConfigBinding(prefix = &quot;dubbo.registry&quot;, type = RegistryConfig.class),
            @EnableDubboConfigBinding(prefix = &quot;dubbo.protocol&quot;, type = ProtocolConfig.class),
            @EnableDubboConfigBinding(prefix = &quot;dubbo.monitor&quot;, type = MonitorConfig.class),
            @EnableDubboConfigBinding(prefix = &quot;dubbo.provider&quot;, type = ProviderConfig.class),
            @EnableDubboConfigBinding(prefix = &quot;dubbo.consumer&quot;, type = ConsumerConfig.class),
            @EnableDubboConfigBinding(prefix = &quot;dubbo.config-center&quot;, type = ConfigCenterBean.class),
            @EnableDubboConfigBinding(prefix = &quot;dubbo.metadata-report&quot;, type = MetadataReportConfig.class)
    })"><pre class="notranslate">    <span class="pl-c1">@</span><span class="pl-c1">EnableDubboConfigBindings</span>({
            <span class="pl-c1">@</span><span class="pl-c1">EnableDubboConfigBinding</span>(<span class="pl-s1">prefix</span> = <span class="pl-s">"dubbo.application"</span>, <span class="pl-s1">type</span> = <span class="pl-smi">ApplicationConfig</span>.<span class="pl-k">class</span>),
            <span class="pl-c1">@</span><span class="pl-c1">EnableDubboConfigBinding</span>(<span class="pl-s1">prefix</span> = <span class="pl-s">"dubbo.module"</span>, <span class="pl-s1">type</span> = <span class="pl-smi">ModuleConfig</span>.<span class="pl-k">class</span>),
            <span class="pl-c1">@</span><span class="pl-c1">EnableDubboConfigBinding</span>(<span class="pl-s1">prefix</span> = <span class="pl-s">"dubbo.registry"</span>, <span class="pl-s1">type</span> = <span class="pl-smi">RegistryConfig</span>.<span class="pl-k">class</span>),
            <span class="pl-c1">@</span><span class="pl-c1">EnableDubboConfigBinding</span>(<span class="pl-s1">prefix</span> = <span class="pl-s">"dubbo.protocol"</span>, <span class="pl-s1">type</span> = <span class="pl-smi">ProtocolConfig</span>.<span class="pl-k">class</span>),
            <span class="pl-c1">@</span><span class="pl-c1">EnableDubboConfigBinding</span>(<span class="pl-s1">prefix</span> = <span class="pl-s">"dubbo.monitor"</span>, <span class="pl-s1">type</span> = <span class="pl-smi">MonitorConfig</span>.<span class="pl-k">class</span>),
            <span class="pl-c1">@</span><span class="pl-c1">EnableDubboConfigBinding</span>(<span class="pl-s1">prefix</span> = <span class="pl-s">"dubbo.provider"</span>, <span class="pl-s1">type</span> = <span class="pl-smi">ProviderConfig</span>.<span class="pl-k">class</span>),
            <span class="pl-c1">@</span><span class="pl-c1">EnableDubboConfigBinding</span>(<span class="pl-s1">prefix</span> = <span class="pl-s">"dubbo.consumer"</span>, <span class="pl-s1">type</span> = <span class="pl-smi">ConsumerConfig</span>.<span class="pl-k">class</span>),
            <span class="pl-c1">@</span><span class="pl-c1">EnableDubboConfigBinding</span>(<span class="pl-s1">prefix</span> = <span class="pl-s">"dubbo.config-center"</span>, <span class="pl-s1">type</span> = <span class="pl-smi">ConfigCenterBean</span>.<span class="pl-k">class</span>),
            <span class="pl-c1">@</span><span class="pl-c1">EnableDubboConfigBinding</span>(<span class="pl-s1">prefix</span> = <span class="pl-s">"dubbo.metadata-report"</span>, <span class="pl-s1">type</span> = <span class="pl-smi">MetadataReportConfig</span>.<span class="pl-k">class</span>)
    })</pre></div>