问题描述:
1、No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalancer?
2、Failed to read artifact descriptor for org.springframework.cloud:spring-cloud-starter-loadbalancer:jar:3.0.3
原因:
spring cloud版本过高之后,没有包含负载均衡的包
解决:
在common模块中pom文件中引入:
<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-starter-loadbalancer</artifactId>
<version>2.2.5.RELEASE</version>
</dependency>
问题仍未解决,则重新规定版本:
2.4.1
2020.0.1
2.2.5.RELEASE