Questions tagged [feign]

Feign is a java to http client binder inspired by Retrofit, JAXRS-2.0, and WebSocket. Feign's first goal was reducing the complexity of binding Denominator uniformly to http apis regardless of restfulness.

635 questions
6
votes
10 answers

Spring boot application not able to find bean for feign client

Getting below exception while testing feign functionality. ********************* APPLICATION FAILED TO START ********************* Description: Field currencyConversionServiceProxy in…
6
votes
3 answers

Feign Client Throwing Unauthorized Exception for Url, where authentication is not needed

I have followed this blog and have created few microservices: Eureka-server,Auth-service,Zuul-service,Gallery-service,Image-service. From the gallery service I wanted to invoke auth-service API using Feign-Client The url doesn't require…
Harsha Sridhar
  • 99
  • 1
  • 2
  • 9
6
votes
1 answer

Special characters in @QueryParam name in Spring feign client

One of our external API uses query param names with special characters (don't ask me why, I don't know). My feign client's method for this API is declared like this: @GetMapping("/v1/user/{userId}/orders") List getOrders( …
zolv
  • 1,720
  • 2
  • 19
  • 36
6
votes
1 answer

Is it possible to use @FeignClient without ribbon?

I want to use @FeignClient(url=...) and make it go directly to the given url instead of picking up hosts from ribbon config. I am aware that in spring-cloud feign comes together with ribbon and eureka by default. According to…
fyrkov
  • 2,245
  • 16
  • 41
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
6
votes
2 answers

How to implement Sleuth Tracing With Feign.Builder?

I'm trying to integrate Sleuth into our system. If I use interfaces annotated with @FeignClient, everything works fine. These interfaces get instrumented automatically, and Sleuth headers get propagated with REST calls. But, we have some existing…
6
votes
4 answers

Override @FeignClient using a @Configuration bean for tests

Is it possible to override a bean created through the @FeignClient annotation by just creating a @Configuration bean that contains a mocked version of it for testing? I've already tried it but it seems the @FeignClient bean is created last (or so I…
Juan Vega
  • 1,030
  • 1
  • 16
  • 32
6
votes
1 answer

spring cloud feign hystrix fallback not work

same code with spring boot version 1.3.8.RELEASE and cloud version 'Brixton.SR' works right. but '1.5.2.RELEASE' and 'Dalston.RC1' not work. exception HTTP Status 500 - Request processing failed; nested exception is java.lang.RuntimeException:…
chenjiankang
  • 61
  • 1
  • 3
6
votes
2 answers

SpringBoot: FeignClient with SSL (p12)

I'm trying to create a FeignClient for one external HTTP API which uses SSL. The struggle is - how to modify default Spring FeignClient with my logic, in this case SSL Connection Factory. So basically I wanna keep all the good things Spring…
Val
  • 381
  • 1
  • 3
  • 11
6
votes
3 answers

Can't get Feign Client to work for a basic example

Can't get Feign Client to work. First tried with POST. Kept running into errors related to Encoder/Decoder saying type is not right. Then found an example on github to call simple GET API finally and decided to give it a shot. Still fails On Github…
Rockoder
  • 746
  • 2
  • 11
  • 22
5
votes
1 answer

Replace org.springframework.cloud.openfeign.ribbon.CachingSpringLoadBalancerFactory

When I upgrade implementation 'org.springframework.cloud:spring-cloud-openfeign-core:2.2.2.RELEASE' to latest version implementation 'org.springframework.cloud:spring-cloud-openfeign-core:3.1.1' I get error for this imported class: import…
Peter Penzov
  • 1,126
  • 134
  • 430
  • 808
5
votes
1 answer

How to make multiple FeignClient-s to use same serviceId/name?

assume 2 endpoints: @RequestMapping("/ep1") interface Endpoint1 { @GetMapping("/echo") String echo(); } @RequestMapping("/ep2") interface Endpoint2 { @GetMapping("/echo") String echo(); } On backend side are both running in same…
mirec
  • 627
  • 1
  • 8
  • 23
5
votes
2 answers

How to implement status checking for feign client?

I'm trying to combine 2 or more services and I want to check statuses of them and return custom response. For example one of them returns 200 and the other returns 500, 404, 400 and etc. In this case I want to return empty list. The example below is…
ElbrusGarayev
  • 91
  • 1
  • 1
  • 7
5
votes
0 answers

Content type header value resulting in UnsupportedMediaType 415 OpenFeign

We recently upgraded to spring-cloud-starter-openfeign: 2.2.2 from version 2.0.0 and we encountered the following exception when calling the REST API that uses consumes and also having @RequestHeader Content-Type: …
Yuval Simhon
  • 1,439
  • 2
  • 19
  • 34
5
votes
0 answers

Java - SpringBoot + Feign + Eureka (Feign not resolving URL from Eureka)

I have an Eureka server already running and I have a Microservice registered there (account-server -> Service B). The issue is when trying to use Feign from Service A. Let's say I have a class in Service A. @FeignClient("account-server") public…
Daniel Hernández
  • 4,078
  • 6
  • 27
  • 38