zoukankan      html  css  js  c++  java
  • 记录一次SpringCloud Alibaba整合Springboot出现的'com.netflix.client.config.IClientConfig' that could not be found

    版本:

                <dependency>
                    <groupId>org.springframework.cloud</groupId>
                    <artifactId>spring-cloud-dependencies</artifactId>
                    <version>Greenwich.SR3</version>
                    <type>pom</type>
                    <scope>import</scope>
                </dependency>
    
                <dependency>
                    <groupId>com.alibaba.cloud</groupId>
                    <artifactId>spring-cloud-alibaba-dependencies</artifactId>
                    <version>2.1.1.RELEASE</version>
                    <type>pom</type>
                    <scope>import</scope>
                </dependency>

    Nacos:

    1.1.4

    启动报错信息:

    Parameter 0 of method ribbonServerList in com.alibaba.cloud.nacos.ribbon.NacosRibbonClientConfiguration required a bean of type 'com.netflix.client.config.IClientConfig' that could not be found.

    找不到这个IClientConfig的文件。

    但是我只是引入了依赖,甚至连@EnableDiscoveryClient注解都没加,我直接启动SpringBoot项目,启动失败,报如上的错。

    SpringBoot启动类是放在com.XXX包下的。

    后来,我将SpringBoot的启动类移动到com包下,启动,问题解决了。

    这应该是个Bug,按理说只要SpringBoot启动类只要放在com包下就可以,而且SpringBoot官网还推荐放在com主目录下的嘞。不知道SpringCloudAlibaba在后面的版本有没有修复这个bug。。。

  • 相关阅读:
    面向过程
    生成器
    迭代器
    装饰器
    函数及嵌套
    字符编码与文件操作
    linux_ssh
    LNMP
    BZOJ 3238: [Ahoi2013]差异
    BZOJ 3998: [TJOI2015]弦论
  • 原文地址:https://www.cnblogs.com/yibao/p/14493861.html
Copyright © 2011-2022 走看看