Questions tagged [openfeign]
237 questions
31
votes
9 answers
bean creation error when starting spring boot application
When i try to run my spring boot application i get this Exception:
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'configurationPropertiesBeans' defined in
class path…

NyeSass
- 373
- 1
- 4
- 10
21
votes
5 answers
java.lang.IllegalStateException: No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-netflix-ribbon?
I am getting exception:
FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-netflix-ribbon?
at…
user4811324
16
votes
3 answers
SpringBoot FeignClient vs WebClient
I want to consume a couple of rest services. Before, I used RestTemplate, but now I want to know The main differences between Spring Boot FeignClient and WebClient.
When should they be used?

Tohid Makari
- 1,700
- 3
- 15
- 29
10
votes
1 answer
Feign client retry on exception
So far we have a feign client which in case of exception, we used to retry as below
Retryer retryer = RetryerBuilder.newBuilder()
.retryIfExceptionOfType(FeignException.class)
…

NoobEditor
- 15,563
- 19
- 81
- 112
8
votes
4 answers
Unable to make field static final java.lang.invoke.MethodHandles$Lookup java.lang.invoke.MethodHandles$Lookup.IMPL_LOOKUP
I have a Spring Feign client which is sending POJO object to remote endpoint using POST and my application start-up fails with below exceptions.
java.lang.reflect.InaccessibleObjectException: Unable to make field static final…

Ashfaq Khan
- 101
- 1
- 4
8
votes
2 answers
Openfeign ErrorDecoder caused java.io.IOException: stream is closed
When i try to implements ErrorDecoder to decode the feign exception, i found the stream in response.body() is closed, so when i try to read the stream and trans to string, it throw java.io.IOException: stream is closed. It's really confused because…

bjwzds
- 103
- 1
- 1
- 5
8
votes
5 answers
FeignClient not resolving Eureka service name
I'm writing a Eureka Client Application using spring-cloud-starter-openfeign client.
Here is my POM

Abdul Mohsin
- 1,253
- 1
- 13
- 24
7
votes
3 answers
Feign.Builder "target values must be absolute" error: how to call docker container with absolute url?
I have several microservices communicating each other with OpenFeign. Each one is a submodule of a project(call it "parent"), with its own docker container.
OK. So, when I want to build a client with feign.builder().target() method, an error occurs…

WesternGun
- 11,303
- 6
- 88
- 157
6
votes
1 answer
Could not find class [org.springframework.boot.autoconfigure.condition.OnBeanCondition]
Im using feign client to make rest calls between microservices, When i execute it using IntelliJ IDEA its working fine. But if i execute it with jar it gives me following error.
org.springframework.beans.factory.BeanDefinitionStoreException: Failed…

Lasitha Nuwan
- 61
- 2
6
votes
1 answer
How to Autowire FeignClient into Test Class
I've written a FeignClient and I would like to test that it works using a unit test. (For my case, integration tests is not the right approach for the current development stage).
In my test, the FeignClient is not initialized (null): I receive a…

KerenSi
- 389
- 7
- 20
6
votes
2 answers
How to pass Pageable to Feign Client in POST Request with additional @RequestBody
I tried to create a feign client for my REST service controller in Spring.
@PostMapping("/search")
public Page searchMeasures(@RequestBody MeasureDto example, Pageable pageable) {
...
}
The client looks like…

Manuel Waltschek
- 515
- 1
- 6
- 23
6
votes
2 answers
OAuth2FeignRequestInterceptor class deprecated in Spring Boot 2.3
In our last feign client security configuration we have this Bean:
@Bean
public RequestInterceptor oauth2FeignRequestInterceptor(
ClientCredentialsResourceDetails oauth2RemoteResource) {
return new…

ChetoCovers
- 61
- 1
- 2
6
votes
2 answers
Feign get request with body
For some reason I need to call a GET method API and pass json request body for it. I really couldn't find an example for it. I wonder if it is even supported using feign.
How can I do that using feign?

Ali Farhoudi
- 5,350
- 7
- 26
- 44
6
votes
3 answers
Is there a way to add multiple headers when using Feign Client
I have a Feign client to access to an createUser endpoint that requires two headers: username and password. I know how to add one header, but how do I add two headers to the request?
@FeignClient(name = "client", url = "https://abc.abc.com/user/",…

jlp
- 1,656
- 6
- 33
- 48
6
votes
1 answer
difference between openfeign or feign
What is the difference between:
spring-cloud-starter-openfeign (https://github.com/spring-cloud/spring-cloud-openfeign) and
spring-cloud-starter-feign (https://github.com/spring-cloud/spring-cloud-netflix) ?
I found this issue when I was trying to…

Mohamed Taboubi
- 6,663
- 11
- 55
- 87