<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"> 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.6</li>
<li>Operating System version: windows10</li>
<li>Java version: 1.8<br>
我使用的是dubbo的注解@DubboComponentScan(basePackages = "com.td.service")，在springboot中使用<br>
我将dubbo从2.7.3升级到2.7.6，任何代码都不修改的情况下，2.7.3能正常启动使用，2.7.6会报以下异常<br>
org.springframework.beans.factory.support.BeanDefinitionOverrideException: Invalid bean definition with name 'dubboBootstrapApplicationListener' defined in null: Cannot register bean definition [Generic bean: class [org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener]; scope=singleton; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] for bean 'dubboBootstrapApplicationListener': There is already [Root bean: class [org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] bound.<br>
at org.springframework.beans.factory.support.DefaultListableBeanFactory.registerBeanDefinition(DefaultListableBeanFactory.java:891) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE]<br>
at org.springframework.beans.factory.support.BeanDefinitionReaderUtils.registerBeanDefinition(BeanDefinitionReaderUtils.java:166) ~[spring-beans-5.1.7.RELEASE.jar:5.1.7.RELEASE]<br>
at org.springframework.context.annotation.AnnotatedBeanDefinitionReader.doRegisterBean(AnnotatedBeanDefinitionReader.java:246) ~[spring-context-5.1.7.RELEASE.jar:5.1.7.RELEASE]<br>
at org.springframework.context.annotation.AnnotatedBeanDefinitionReader.registerBean(AnnotatedBeanDefinitionReader.java:145) ~[spring-context-5.1.7.RELEASE.jar:5.1.7.RELEASE]<br>
at org.springframework.context.annotation.AnnotatedBeanDefinitionReader.register(AnnotatedBeanDefinitionReader.java:135) ~[spring-context-5.1.7.RELEASE.jar:5.1.7.RELEASE]<br>
at com.alibaba.spring.util.AnnotatedBeanDefinitionRegistryUtils.registerBeans(AnnotatedBeanDefinitionRegistryUtils.java:112) ~[spring-context-support-1.0.6.jar:na]<br>
at org.apache.dubbo.config.spring.beans.factory.annotation.ServiceAnnotationBeanPostProcessor.postProcessBeanDefinitionRegistry(ServiceAnnotationBeanPostProcessor.java:113) ~[dubbo-2.7.6.jar:2.7.6]<br>
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275) ~[spring-context-5.1.7.RELEASE.jar:5.1.7.RELEASE]<br>
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:125) ~[spring-context-5.1.7.RELEASE.jar:5.1.7.RELEASE]<br>
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:705) ~[spring-context-5.1.7.RELEASE.jar:5.1.7.RELEASE]<br>
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:531) ~[spring-context-5.1.7.RELEASE.jar:5.1.7.RELEASE]<br>
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE]<br>
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE]<br>
at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE]<br>
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE]<br>
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE]<br>
at com.td.DZPKLauncher.main(DZPKLauncher.java:30) ~[classes/:na]</li>
</ul>
<p dir="auto">需要我添加允许重复定义覆盖的配置：<br>
spring:<br>
main:<br>
allow-bean-definition-overriding: true<br>
才能启动</p>
<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.3</li>
<li>Operating System version: mac</li>
<li>Java version: jdk8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>
<p dir="auto">Configure the nacos endpoint address: dev.nacos.com:8080</p>
</li>
<li>
<p dir="auto">The dubbo configuration resolves the port error. No port number is parsed and passed to nacos for initialization.</p>
</li>
<li>
<p dir="auto">配置nacos endpoint地址：dev.nacos.com:8080</p>
</li>
<li>
<p dir="auto">dubbo 配置解析端口错误。没有有端口号解析出来传给nacos进行初始化</p>
</li>
</ol>
<p dir="auto">code：<br>
</p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/apache/dubbo/blob/7d564e75fe776681e9e3c0a6f6bd1c4ad1ea51af/dubbo-registry/dubbo-registry-nacos/src/main/java/org/apache/dubbo/registry/nacos/NacosRegistryFactory.java#L95">dubbo/dubbo-registry/dubbo-registry-nacos/src/main/java/org/apache/dubbo/registry/nacos/NacosRegistryFactory.java</a>
    </p>
    <p class="mb-0 color-fg-muted">
         Line 95
      in
      <a data-pjax="true" class="commit-tease-sha" href="/apache/dubbo/commit/7d564e75fe776681e9e3c0a6f6bd1c4ad1ea51af">7d564e7</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L95" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="95"></td>
          <td id="LC95" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-en">putPropertyIfAbsent</span>(<span class="pl-s1">url</span>, <span class="pl-s1">properties</span>, <span class="pl-c1">ENDPOINT</span>); </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">Normal resolution endpoint port</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">Failed to parse endpoint port</p>