Questions tagged [openfeign]

237 questions
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

implement circuit breaker with openfeign in spring-boot 2.4 and spring cloud 2020

If I want to upgrade to spring-boot 2.4 and spring cloud 2020. Now that spring-cloud-starter-netflix-hystrix has been removed from spring-cloud-netflix, How can I implement circuit breaker with openfeign? I did a direct import but my IDE cannot…
3
votes
1 answer

Migrate Feign Load Balancer implementation to compatible with Spring cloud 2020.0.0

I have below implementation of Feign Load balancer which is working with spring cloud Hoxtan SR6 dependencies. import feign.auth.BasicAuthRequestInterceptor; import org.apache.http.conn.ssl.NoopHostnameVerifier; import…
Ruchira Gayan Ranaweera
  • 34,993
  • 17
  • 75
  • 115
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
1 answer

Communication between Microservices: Spring cloud OpenFeign vs WebClient/RestTemplate

Any idea please about the best way to use for back to back communication ? spring cloud OpenFeign or WebClient/RestTemplate ? I think Feign client should be used when spring cloud gateway need to communicate to other microservices, whereas…
Amir Choubani
  • 829
  • 2
  • 14
  • 28
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
3
votes
1 answer

Autowire FeignClient across maven Project

I have Projects built with Spring-boot, Maven and Kotlin. I want to expose some Services and FeignClients in a maven Project, so others can use them. For a class with Annotations like @Service that works well. But I need to expose also FeignClients,…
user3603819
  • 597
  • 1
  • 4
  • 18
3
votes
1 answer

How ignore not annoted methods using OpenFeign SpringMvcContract

I'm using swagger-codegen to genrate the interface for my Feign Client. However the swagger-codegen generates these methods : Optional getObjectMapper(); Optional getRequest(); And when I run my application I…
Mohamed Taboubi
  • 6,663
  • 11
  • 55
  • 87
3
votes
1 answer

OpenFeign Builder default client

What is the default Client used by Openfeign Builder. OkHttp client Feign.builder().client(new feign.okhttp.OkHttpClient()).target(SomeData.class,"http://test.com"); What is the default…
Sarav
  • 245
  • 3
  • 12
2
votes
0 answers

SpringQueryMap adds query params as body instead passing them in the url

I am using Spring-Boot 3.0.2 with openfeign 4.0.1 in a small Spring-boot application. org.springframework.boot spring-boot-starter-parent 3.0.2
robhok
  • 21
  • 2
2
votes
0 answers

How to use openFeign to follow redirection of a HTTP POST request with body?

I found that feign would run into an error(error message "ERROR HttpRetryException: cannot retry due to redirection, in streaming mode") if I used it to send a POST request with a body value to a server which would return an HTTP 302 status code to…
user1726366
  • 2,256
  • 4
  • 15
  • 17
2
votes
0 answers

How do I get the response status code of a void method?

/I'm trying to use a Feign-client to communicate another rest service which will return status code 204 with no body/ public interface DepartmentApi { @RequestLine("GET /department/nocontent") /*Department Client*/ @Headers("Content-Type:…
2
votes
1 answer

How can I use Spring Cloud OpenFeign with Spring Boot 3.0.0-M4?

I want to use Spring Cloud OpenFeign with Spring Boot 3.0.0-M4 But I could not find the compatible version of Spring Cloud OpenFeign with spring boot 3.0.0-M4. for using OpenFeign with this version of spring boot what should I do?
2
votes
1 answer

using Spring-Cloud Open Feign, how do i read nested JSON data of another type?

@FeignClient(name="service", url="http://localhost:80/") public interface apiService { @GetMapping(value = "/student") @Headers(value = "Content-Type: application/json") List getAll(); } Blockquote @RestController …
Cen Jake
  • 21
  • 4
1 2
3
15 16