alibaba / spring-cloud-alibaba

Spring Cloud Alibaba provides a one-stop solution for application development for the distributed solutions of Alibaba middleware.
https://sca.aliyun.com
Apache License 2.0
27.57k stars 8.24k forks source link

Nacos启动报错NacosRibbonClientConfiguration required a bean of type 'com.netflix.client.config.IClientConfig' that could not be found. #2967

Closed ljj0915 closed 1 year ago

ljj0915 commented 1 year ago

我的本地项目如果以com为开头。我发现Nacos就会去加载本地项目中是否包含com.netflix.client.config.IClientConfig这个类。 如果没有,就会报错。最简单的解决方案就是不以com为开头作为包路径。 我想了解下为什么会有这样的机制。

My local project starts with com. I found Nacos will be whether to load the local project contains com.net flix. Client. Config. IClientConfig this class. If not, an error will be reported. The simplest solution is not to start with com as the package path. I want to understand why this mechanism exists.

Phixsura commented 1 year ago

Please refer to #1902 .The discussion in this issue may solve your problem

Phixsura commented 1 year ago

Simply put, if you use com as a single-tier package to develop your business, this will add redundant scanning when loading the configuration, which may lead to problems as described by you

ljj0915 commented 1 year ago

Simply put, if you use com as a single-tier package to develop your business, this will add redundant scanning when loading the configuration, which may lead to problems as described by you

Thanks