<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/incubator-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/incubator-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.0</li>
<li>Operating System version: win7</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>run provider</li>
<li>run consumer</li>
<li>consumer run fail</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>
<p dir="auto">consumer run success and i can request method.</p>
<p dir="auto">What actually happens?</p>
<p dir="auto">consumer run fail<br>
see the code below<br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/RestController/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/RestController">@RestController</a><br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/RequestMapping/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/RequestMapping">@RequestMapping</a>("category")<br>
@DubboComponentScan</p>
<p dir="auto">public class CateGoryController {<br>
<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/reference/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/reference">@reference</a><br>
private CateGoryService cateGoryService;</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@RequestMapping(&quot;findTree&quot;)
public List&lt;Category&gt; findCateGoryTree(){
    return cateGoryService.findCateGoryTree();
}"><pre class="notranslate"><code class="notranslate">@RequestMapping("findTree")
public List&lt;Category&gt; findCateGoryTree(){
    return cateGoryService.findCateGoryTree();
}
</code></pre></div>
<p dir="auto">}</p>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<p dir="auto">org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cateGoryController': Injection of @org.apache.dubbo.config.annotation.Reference dependencies is failed; nested exception is java.lang.UnsupportedOperationException<br>
at org.apache.dubbo.config.spring.beans.factory.annotation.AnnotationInjectedBeanPostProcessor.postProcessPropertyValues(AnnotationInjectedBeanPostProcessor.java:132)<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1268)<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)<br>
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)<br>
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)<br>
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)<br>
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)<br>
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)<br>
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)<br>
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)<br>
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)<br>
at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:668)<br>
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:634)<br>
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:682)<br>
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:553)<br>
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:494)<br>
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:171)<br>
at javax.servlet.GenericServlet.init(GenericServlet.java:160)<br>
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1280)<br>
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1193)<br>
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1088)<br>
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5176)<br>
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5460)<br>
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)<br>
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)<br>
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)<br>
at java.util.concurrent.FutureTask.run(FutureTask.java:266)<br>
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)<br>
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)<br>
at java.lang.Thread.run(Thread.java:744)<br>
Caused by: java.lang.UnsupportedOperationException<br>
at java.util.concurrent.CopyOnWriteArrayList$COWIterator.set(CopyOnWriteArrayList.java:1185)<br>
at java.util.Collections.sort(Collections.java:170)<br>
at org.apache.dubbo.rpc.cluster.RouterChain.sort(RouterChain.java:87)<br>
at org.apache.dubbo.rpc.cluster.RouterChain.initWithRouters(RouterChain.java:67)<br>
at org.apache.dubbo.rpc.cluster.RouterChain.(RouterChain.java:57)<br>
at org.apache.dubbo.rpc.cluster.RouterChain.buildChain(RouterChain.java:46)<br>
at org.apache.dubbo.registry.integration.RegistryDirectory.buildRouterChain(RegistryDirectory.java:584)<br>
at org.apache.dubbo.registry.integration.RegistryProtocol.doRefer(RegistryProtocol.java:376)<br>
at org.apache.dubbo.registry.integration.RegistryProtocol.refer(RegistryProtocol.java:359)<br>
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:114)<br>
at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:65)<br>
at org.apache.dubbo.qos.protocol.QosProtocolWrapper.refer(QosProtocolWrapper.java:70)<br>
at org.apache.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java)<br>
at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:362)<br>
at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:301)<br>
at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:225)<br>
at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor$ReferenceBeanInvocationHandler.init(ReferenceAnnotationBeanPostProcessor.java:162)<br>
at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor$ReferenceBeanInvocationHandler.access$100(ReferenceAnnotationBeanPostProcessor.java:146)<br>
at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.buildInvocationHandler(ReferenceAnnotationBeanPostProcessor.java:140)<br>
at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.buildProxy(ReferenceAnnotationBeanPostProcessor.java:122)<br>
at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.doGetInjectedBean(ReferenceAnnotationBeanPostProcessor.java:116)<br>
at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.doGetInjectedBean(ReferenceAnnotationBeanPostProcessor.java:49)<br>
at org.apache.dubbo.config.spring.beans.factory.annotation.AnnotationInjectedBeanPostProcessor.getInjectedObject(AnnotationInjectedBeanPostProcessor.java:340)<br>
at org.apache.dubbo.config.spring.beans.factory.annotation.AnnotationInjectedBeanPostProcessor$AnnotatedFieldElement.inject(AnnotationInjectedBeanPostProcessor.java:520)<br>
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)<br>
at org.apache.dubbo.config.spring.beans.factory.annotation.AnnotationInjectedBeanPostProcessor.postProcessPropertyValues(AnnotationInjectedBeanPostProcessor.java:128)<br>
... 29 more<br>
Just put your stack trace here!</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>
<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.4.1</li>
<li>Operating System version: Windows 10 专业版 1809</li>
<li>Java version: 1.8.0.191</li>
<li>Apollo version: 1.5.0</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">根据2.7.4.1的release note：<a href="https://github.com/apache/dubbo/releases/tag/dubbo-2.7.4">https://github.com/apache/dubbo/releases/tag/dubbo-2.7.4</a><br>
PR：<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="497404334" data-permission-text="Title is private" data-url="https://github.com/apache/dubbo/issues/5105" data-hovercard-type="pull_request" data-hovercard-url="/apache/dubbo/pull/5105/hovercard" href="https://github.com/apache/dubbo/pull/5105">#5105</a><br>
issue：<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="400549272" data-permission-text="Title is private" data-url="https://github.com/apache/dubbo/issues/3266" data-hovercard-type="issue" data-hovercard-url="/apache/dubbo/issues/3266/hovercard" href="https://github.com/apache/dubbo/issues/3266">#3266</a></p>
<p dir="auto">我在apollo中使用了一个namespace对应一个配置文件的存储和组织模型，比如dubbo namespace(类型：properties)，对应<code class="notranslate">dubbo.properties</code>，里面的配置项目是<code class="notranslate">dubbo.properties</code>中的配置项目,而不是之前的一个key:<code class="notranslate">dubbo.properties</code>里面存储了整个<code class="notranslate">dubbo.properties</code>的内容</p>
<p dir="auto">具体配置：<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="513224467" data-permission-text="Title is private" data-url="https://github.com/apolloconfig/apollo/issues/2702" data-hovercard-type="issue" data-hovercard-url="/apolloconfig/apollo/issues/2702/hovercard" href="https://github.com/apolloconfig/apollo/issues/2702">apolloconfig/apollo#2702</a></p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">dubbo consumer 正常启动</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">最后应用异常退出</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2019-10-28 18:02:46.676 [main] INFO  org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener - 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2019-10-28 18:02:46.678 [main] INFO  org.apache.dubbo.spring.boot.context.event.AwaitingNonWebApplicationListener -  [Dubbo] Current Spring Boot Application is about to shutdown...
2019-10-28 18:02:46.692 [main] ERROR org.springframework.boot.SpringApplication - Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dubboConsumerController': Injection of @Reference dependencies is failed; nested exception is java.lang.IllegalStateException: No registry config found or it's not a valid config! The registry config is: &lt;dubbo:registry valid=&quot;false&quot; zookeeperProtocol=&quot;false&quot; prefix=&quot;dubbo.registry&quot; /&gt;
	at org.apache.dubbo.config.spring.beans.factory.annotation.AnnotationInjectedBeanPostProcessor.postProcessPropertyValues(AnnotationInjectedBeanPostProcessor.java:150) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1416) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:845) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:743) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:390) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1214) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1203) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
	at com.test.consumer_a.DubboConsumerApplication.main(DubboConsumerApplication.java:13) [classes/:?]
Caused by: java.lang.IllegalStateException: No registry config found or it's not a valid config! The registry config is: &lt;dubbo:registry valid=&quot;false&quot; zookeeperProtocol=&quot;false&quot; prefix=&quot;dubbo.registry&quot; /&gt;
	at org.apache.dubbo.config.AbstractInterfaceConfig.checkRegistry(AbstractInterfaceConfig.java:203) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:378) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:329) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:250) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.getOrCreateProxy(ReferenceAnnotationBeanPostProcessor.java:246) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.doGetInjectedBean(ReferenceAnnotationBeanPostProcessor.java:143) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.config.spring.beans.factory.annotation.AnnotationInjectedBeanPostProcessor.getInjectedObject(AnnotationInjectedBeanPostProcessor.java:359) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.config.spring.beans.factory.annotation.AnnotationInjectedBeanPostProcessor$AnnotatedFieldElement.inject(AnnotationInjectedBeanPostProcessor.java:539) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.apache.dubbo.config.spring.beans.factory.annotation.AnnotationInjectedBeanPostProcessor.postProcessPropertyValues(AnnotationInjectedBeanPostProcessor.java:146) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	... 17 more
Disconnected from the target VM, address: '127.0.0.1:55529', transport: 'socket'

Process finished with exit code 1"><pre class="notranslate"><code class="notranslate">2019-10-28 18:02:46.676 [main] INFO  org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener - 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2019-10-28 18:02:46.678 [main] INFO  org.apache.dubbo.spring.boot.context.event.AwaitingNonWebApplicationListener -  [Dubbo] Current Spring Boot Application is about to shutdown...
2019-10-28 18:02:46.692 [main] ERROR org.springframework.boot.SpringApplication - Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dubboConsumerController': Injection of @Reference dependencies is failed; nested exception is java.lang.IllegalStateException: No registry config found or it's not a valid config! The registry config is: &lt;dubbo:registry valid="false" zookeeperProtocol="false" prefix="dubbo.registry" /&gt;
	at org.apache.dubbo.config.spring.beans.factory.annotation.AnnotationInjectedBeanPostProcessor.postProcessPropertyValues(AnnotationInjectedBeanPostProcessor.java:150) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1416) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:845) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:743) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:390) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1214) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1203) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
	at com.test.consumer_a.DubboConsumerApplication.main(DubboConsumerApplication.java:13) [classes/:?]
Caused by: java.lang.IllegalStateException: No registry config found or it's not a valid config! The registry config is: &lt;dubbo:registry valid="false" zookeeperProtocol="false" prefix="dubbo.registry" /&gt;
	at org.apache.dubbo.config.AbstractInterfaceConfig.checkRegistry(AbstractInterfaceConfig.java:203) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:378) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:329) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:250) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.getOrCreateProxy(ReferenceAnnotationBeanPostProcessor.java:246) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.doGetInjectedBean(ReferenceAnnotationBeanPostProcessor.java:143) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.config.spring.beans.factory.annotation.AnnotationInjectedBeanPostProcessor.getInjectedObject(AnnotationInjectedBeanPostProcessor.java:359) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.apache.dubbo.config.spring.beans.factory.annotation.AnnotationInjectedBeanPostProcessor$AnnotatedFieldElement.inject(AnnotationInjectedBeanPostProcessor.java:539) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at org.apache.dubbo.config.spring.beans.factory.annotation.AnnotationInjectedBeanPostProcessor.postProcessPropertyValues(AnnotationInjectedBeanPostProcessor.java:146) ~[dubbo-2.7.4.1.jar:2.7.4.1]
	... 17 more
Disconnected from the target VM, address: '127.0.0.1:55529', transport: 'socket'

Process finished with exit code 1
</code></pre></div>
<p dir="auto">我在<code class="notranslate">com.ctrip.framework.apollo.internals.RemoteConfigRepository</code>构造函数第一行下了断点，发现dubbo还是会传入<code class="notranslate">dubbo.properties</code>作为namespace来查询配置，具体的堆栈信息如下：</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;init&gt;:79, RemoteConfigRepository (com.ctrip.framework.apollo.internals)
createRemoteConfigRepository:77, DefaultConfigFactory (com.ctrip.framework.apollo.spi)
createLocalConfigRepository:73, DefaultConfigFactory (com.ctrip.framework.apollo.spi)
createConfigFile:47, DefaultConfigFactory (com.ctrip.framework.apollo.spi)
getConfigFile:58, DefaultConfigManager (com.ctrip.framework.apollo.internals)
getConfigFile:65, ConfigService (com.ctrip.framework.apollo)
getProperties:155, ApolloDynamicConfiguration (org.apache.dubbo.configcenter.support.apollo)
getProperties:110, DynamicConfiguration (org.apache.dubbo.configcenter)
prepareEnvironment:291, AbstractInterfaceConfig (org.apache.dubbo.config)
startConfigCenter:280, AbstractInterfaceConfig (org.apache.dubbo.config)
checkAndUpdateSubConfigs:220, ReferenceConfig (org.apache.dubbo.config)
get:244, ReferenceConfig (org.apache.dubbo.config)
getOrCreateProxy:246, ReferenceAnnotationBeanPostProcessor (org.apache.dubbo.config.spring.beans.factory.annotation)
doGetInjectedBean:143, ReferenceAnnotationBeanPostProcessor (org.apache.dubbo.config.spring.beans.factory.annotation)
getInjectedObject:359, AnnotationInjectedBeanPostProcessor (org.apache.dubbo.config.spring.beans.factory.annotation)
inject:539, AnnotationInjectedBeanPostProcessor$AnnotatedFieldElement (org.apache.dubbo.config.spring.beans.factory.annotation)
inject:90, InjectionMetadata (org.springframework.beans.factory.annotation)
postProcessPropertyValues:146, AnnotationInjectedBeanPostProcessor (org.apache.dubbo.config.spring.beans.factory.annotation)
populateBean:1416, AbstractAutowireCapableBeanFactory (org.springframework.beans.factory.support)
doCreateBean:592, AbstractAutowireCapableBeanFactory (org.springframework.beans.factory.support)
createBean:515, AbstractAutowireCapableBeanFactory (org.springframework.beans.factory.support)
lambda$doGetBean$0:320, AbstractBeanFactory (org.springframework.beans.factory.support)
getObject:-1, 1031775150 (org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$141)
getSingleton:222, DefaultSingletonBeanRegistry (org.springframework.beans.factory.support)
doGetBean:318, AbstractBeanFactory (org.springframework.beans.factory.support)
getBean:199, AbstractBeanFactory (org.springframework.beans.factory.support)
preInstantiateSingletons:845, DefaultListableBeanFactory (org.springframework.beans.factory.support)
finishBeanFactoryInitialization:877, AbstractApplicationContext (org.springframework.context.support)
refresh:549, AbstractApplicationContext (org.springframework.context.support)
refresh:141, ServletWebServerApplicationContext (org.springframework.boot.web.servlet.context)
refresh:743, SpringApplication (org.springframework.boot)
refreshContext:390, SpringApplication (org.springframework.boot)
run:312, SpringApplication (org.springframework.boot)
run:1214, SpringApplication (org.springframework.boot)
run:1203, SpringApplication (org.springframework.boot)
main:13, DubboConsumerApplication (com.test.consumer_a)"><pre class="notranslate"><code class="notranslate">&lt;init&gt;:79, RemoteConfigRepository (com.ctrip.framework.apollo.internals)
createRemoteConfigRepository:77, DefaultConfigFactory (com.ctrip.framework.apollo.spi)
createLocalConfigRepository:73, DefaultConfigFactory (com.ctrip.framework.apollo.spi)
createConfigFile:47, DefaultConfigFactory (com.ctrip.framework.apollo.spi)
getConfigFile:58, DefaultConfigManager (com.ctrip.framework.apollo.internals)
getConfigFile:65, ConfigService (com.ctrip.framework.apollo)
getProperties:155, ApolloDynamicConfiguration (org.apache.dubbo.configcenter.support.apollo)
getProperties:110, DynamicConfiguration (org.apache.dubbo.configcenter)
prepareEnvironment:291, AbstractInterfaceConfig (org.apache.dubbo.config)
startConfigCenter:280, AbstractInterfaceConfig (org.apache.dubbo.config)
checkAndUpdateSubConfigs:220, ReferenceConfig (org.apache.dubbo.config)
get:244, ReferenceConfig (org.apache.dubbo.config)
getOrCreateProxy:246, ReferenceAnnotationBeanPostProcessor (org.apache.dubbo.config.spring.beans.factory.annotation)
doGetInjectedBean:143, ReferenceAnnotationBeanPostProcessor (org.apache.dubbo.config.spring.beans.factory.annotation)
getInjectedObject:359, AnnotationInjectedBeanPostProcessor (org.apache.dubbo.config.spring.beans.factory.annotation)
inject:539, AnnotationInjectedBeanPostProcessor$AnnotatedFieldElement (org.apache.dubbo.config.spring.beans.factory.annotation)
inject:90, InjectionMetadata (org.springframework.beans.factory.annotation)
postProcessPropertyValues:146, AnnotationInjectedBeanPostProcessor (org.apache.dubbo.config.spring.beans.factory.annotation)
populateBean:1416, AbstractAutowireCapableBeanFactory (org.springframework.beans.factory.support)
doCreateBean:592, AbstractAutowireCapableBeanFactory (org.springframework.beans.factory.support)
createBean:515, AbstractAutowireCapableBeanFactory (org.springframework.beans.factory.support)
lambda$doGetBean$0:320, AbstractBeanFactory (org.springframework.beans.factory.support)
getObject:-1, 1031775150 (org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$141)
getSingleton:222, DefaultSingletonBeanRegistry (org.springframework.beans.factory.support)
doGetBean:318, AbstractBeanFactory (org.springframework.beans.factory.support)
getBean:199, AbstractBeanFactory (org.springframework.beans.factory.support)
preInstantiateSingletons:845, DefaultListableBeanFactory (org.springframework.beans.factory.support)
finishBeanFactoryInitialization:877, AbstractApplicationContext (org.springframework.context.support)
refresh:549, AbstractApplicationContext (org.springframework.context.support)
refresh:141, ServletWebServerApplicationContext (org.springframework.boot.web.servlet.context)
refresh:743, SpringApplication (org.springframework.boot)
refreshContext:390, SpringApplication (org.springframework.boot)
run:312, SpringApplication (org.springframework.boot)
run:1214, SpringApplication (org.springframework.boot)
run:1203, SpringApplication (org.springframework.boot)
main:13, DubboConsumerApplication (com.test.consumer_a)
</code></pre></div>
<p dir="auto">在<code class="notranslate">getProperties:155, ApolloDynamicConfiguration (org.apache.dubbo.configcenter.support.apollo)</code>这里传入的是：<code class="notranslate">ConfigService.getConfigFile("dubbo.properties", ConfigFileFormat.Properties)</code></p>
<p dir="auto">而正常的应该是: <code class="notranslate">ConfigService.getConfigFile("dubbo", ConfigFileFormat.Properties)</code></p>