nacos与openfeign使用

出现报错: java.lang.AbstractMethodError: org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient.choose
出现这个问题是没有loadbalancer,但是nacos中ribbon会造成loadbalanc包失效

<dependency>
    <groupId>com.alibaba.cloud</groupId>
    <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
    <exclusions>
        <exclusion>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
        </exclusion>
    </exclusions>
</dependency>
              
<dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-loadbalancer</artifactId>
      <version>2.2.2.RELEASE</version>
</dependency>

posted @ 2021-02-01 18:33  xidianzxm  阅读(448)  评论(0编辑  收藏  举报