``Hi,

I'm using 'org.springframework.cloud:spring-cloud-dependencies:2020.0.5' which is pulling 'org.springframework.cloud:spring-cloud-starter-openfeign:3.0.6' to consume a feign client and getting below error.

Caused by: java.lang.IllegalStateException: No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalancer?

As per my understanding of the below thread, this should be fixed in 2.2.8.RELEASE but still seeing the same issue and not sure what's the root cause of this issue. Please suggest.

https://github.com/spring-cloud/spring-cloud-openfeign/issues/517

Here is the sample code of my app, which is consuming the feign client

@EnableFeignClients(basePackages = {"my.feignclient.package"})
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
}

and here is my feign client

@FeignClient(value = "abc", contextId = "MyApiClient")
public interface MyApiClient extends MyApi {
}

Comment From: OlgaMaciaszek

Hello @rajeshhereforyou , you need to add spring-cloud-starter-loadbalancer dependency to your pom.

Comment From: spring-cloud-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Comment From: spring-cloud-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

Comment From: agitrubard

Hello @rajeshhereforyou , you need to add spring-cloud-starter-loadbalancer dependency to your pom.

The solution is working, thank you very much 🙌🏼

It worked after adding the following dependency to the pom.xml file ✅

<dependency>
   <groupId>org.springframework.cloud</groupId>
   <artifactId>spring-cloud-starter-loadbalancer</artifactId>
</dependency>