No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-netflix-ribbon?
时间: 2023-08-23 20:08:50 浏览: 49
No, I did not forget to include spring-cloud-starter-netflix-ribbon. The error message you mentioned usually occurs when you are trying to use Feign Client for load balancing but have not included the necessary dependencies. To resolve this issue, make sure you have the following dependencies in your project's pom.xml or build.gradle file:
For Maven:
```xml
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
</dependency>
```
For Gradle:
```groovy
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-ribbon'
```
After adding these dependencies, rebuild your project to resolve the issue.