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
4
votes
1 answer

Mock FeignClient response

It's possible to mock response FeignClient via MockRestServiceServer(restTemplate)? This example dosn't work: Application.class @SpringBootApplication @EnableFeignClients public class Application { public static void main(String[] args) { …
Sergey Bulavkin
  • 2,325
  • 2
  • 17
  • 26
4
votes
4 answers

How to fine-tune the Spring Cloud Feign client?

The Spring Cloud doc says: If Hystrix is on the classpath, by default Feign will wrap all methods with a circuit breaker. That's good but how do I configure the Hystrix options to ignore certain exceptions? I've an ErrorDecoder implementation…
4
votes
0 answers

Error with feign client on text/csv response

I have an issue with a feign client created for a rest controller in Spring, in this method I write on HttpServletResponse a csv string but when I want to test the feign implementation is showing a console error. feign.codec.DecodeException: Could…
3
votes
1 answer

Getting "Only Single Level Inheritance Supported" Error with SpringBoot Eureka Feign Client

I am working through a tutorial creating a eureka server and eureka client. Prior to adding the feign client, the eureka client is able to register with the eureka server. After I added the feign maven dependency and created the annotations in the…
Othello
  • 55
  • 11
3
votes
2 answers

How to read header value from feign Response

i am using spring boot to call a openfeign client and from the Response of that feign i need to extract some header values.how can i do that. can anybody help please. just help me wheather we can do that or not!
somya jain
  • 39
  • 1
  • 3
3
votes
1 answer

Multiple Feign clients with different interceptors

I have two Feign clients in Spring Boot doing different things, but would like them to be authenticated differently. @FeignClient( name = "...", url = "${url1}", configuration = Config1.class ) public interface Client1 { …
Brian
  • 7,394
  • 3
  • 25
  • 46
3
votes
0 answers

Is there a way to generate feign client for Microservice in Micronaut with Kotlin?

I am trying to generate feign client for my Microservice. I have tried all the options but could not find any specific solution for this in tech stack I am working with. Using following tech stack: Gradle kotlin Micronaut Note: I do not want to…
3
votes
0 answers

Manually creating a circuit-breaker-wrapped feign client

I'm trying to manually create a circuit-breaker-wrapped Feign client, so that I can use callbacks. I understand that there's another approach that kind of simplify this, which is using the @FeignClient annotation, as well as enabling fallbacks with…
Yves Calaci
  • 1,019
  • 1
  • 11
  • 37
3
votes
2 answers

Creating a Feign configuration just for one client?

I have a whole bunch of Feign clients that uses a shared configuration(MyFeignConfiguration.class): @FeignClient(name = "clientA", url = "http://serviceA.com", fallbackFactory = ServiceAFallbackFactory.class, configuration =…
HelloWorld
  • 109
  • 2
  • 9
3
votes
2 answers

Convert List of Enums to List of String for Spring @RequestParam using feign client

I have an enum class as such: ONE("1", "Description1"), TWO("2", "Description2"); String value; String description; MyEnum(String value, String description) { this.value = value; this.description = description; } @Override public String…
Ahmed
  • 121
  • 6
  • 18
3
votes
2 answers

Open Feign java.lang.NoSuchFieldError: MULTIPART_RELATED Error

I want to upload a file with Feign like this : @FeignClient(name = "GDC", url = "${gdc.url}", configuration = ApiConfig.class) public interface GDCClient { @RequestMapping(method = RequestMethod.POST, value = "/v1/document", consumes…
Anto
  • 31
  • 3
3
votes
0 answers

Feign Client Multipart file upload as resource

I'm trying to upload a file to a REST api using feign client. Which is shown below and works fine. @PostMapping(value = "/test/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) ResponseEntity upload(@RequestPart(value = "data")…
3
votes
0 answers

HystrixRuntimeException : timed-out and no fallback available.] with root cause java.util.concurrent.TimeoutException: null

I am continuously getting HystrixTimeOut exception when invoking another microservice via feign. I have read all the soultions on StackOverFlow and github community but nothing worked for me. below is my configuration: hystrixProperties: …
user4811324
3
votes
0 answers

Consume SOAP with Spring Boot and Feign client

I am struggling to properly make a SOAP request with open feign client and get the response. For testing purposes i took this public SOAP service http://www.learnwebservices.com/ and this is WSDL ->…
Sahbaz
  • 1,242
  • 4
  • 17
  • 39
3
votes
2 answers

How to accept feign response in application/xml

I am invoking 3rd party API which returns a response in XML format. As I have not created any POJO to hold response in my consumer service I am using java.lang.Object for same. I am getting the below…
user4811324