<ul dir="auto">
<li>[ *] 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>[ *] 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: MAC_OS</li>
<li>Java version: 1.8.0_181</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">URL.getColonSeparatedKey() 正常结果应该是{interface}:[version]:[group]<br>
在获取{interface}时，是直接通过INTERFACE_KEY从parameters中获取的，在registry.simplified=true 时：</p>
<p dir="auto">final URL registeredProviderUrl = getRegisteredProviderUrl(providerUrl, registryUrl);</p>
<p dir="auto">registeredProviderUrl 的 parameters中是没有INTERFACE_KEY的。<br>
导致NacosRegistry在获取serviceName时不完整。</p>
<p dir="auto">在append时对INTERFACE_KEY进行特殊处理可以解决<br>
<strong>String parameterValue = INTERFACE_KEY.equals(parameterName)?getServiceInterface():this.getParameter(parameterName);</strong><br>
`</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="public String getColonSeparatedKey() {
    StringBuilder serviceNameBuilder = new StringBuilder();
    append(serviceNameBuilder, INTERFACE_KEY, true);
    append(serviceNameBuilder, VERSION_KEY, false);
    append(serviceNameBuilder, GROUP_KEY, false);
    return serviceNameBuilder.toString();
}

private void append(StringBuilder target, String parameterName, boolean first) {
    String parameterValue = INTERFACE_KEY.equals(parameterName)?getServiceInterface():this.getParameter(parameterName);
    if (!StringUtils.isBlank(parameterValue)) {
        if (!first) {
            target.append(&quot;:&quot;);
        }
        target.append(parameterValue);
    } else {
        target.append(&quot;:&quot;);
    }
}`"><pre class="notranslate"><code class="notranslate">public String getColonSeparatedKey() {
    StringBuilder serviceNameBuilder = new StringBuilder();
    append(serviceNameBuilder, INTERFACE_KEY, true);
    append(serviceNameBuilder, VERSION_KEY, false);
    append(serviceNameBuilder, GROUP_KEY, false);
    return serviceNameBuilder.toString();
}

private void append(StringBuilder target, String parameterName, boolean first) {
    String parameterValue = INTERFACE_KEY.equals(parameterName)?getServiceInterface():this.getParameter(parameterName);
    if (!StringUtils.isBlank(parameterValue)) {
        if (!first) {
            target.append(":");
        }
        target.append(parameterValue);
    } else {
        target.append(":");
    }
}`
</code></pre></div>
<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.8</li>
<li>Operating System version: deepin 15.11</li>
<li>Java version: 1.8.0_261</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">no step</p>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Involved documents</h3>
<p dir="auto">1.dubbo-common/src/test/java/org/apache/dubbo/common/config/configcenter/ConfigChangedEventTest.java<br>
2.dubbo-config-spring/src/test/java/org/apache/dubbo/config/spring/registry/MockRegistryFactory.java</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>