Questions tagged [spring-cloud-feign]

Use this tag for question related to the use of Feign declarative REST client inside the spring cloud ecosystem.

Feign declarative REST client used inside the spring cloud ecosystem.

734 questions
0
votes
1 answer

In case of 401 unauthorized remove header from RequestTemplate and retry

I am inserting an authorization header in a feign request but upon a 401 from the server I am retrying with the same request and same header, resulting in the same error. If I expire manually the token then I end up with 2 Authorization headers old…
Oh hi Mark
  • 153
  • 1
  • 8
  • 28
0
votes
0 answers

Feign: How to catch API error status codes in spring

I am using srping framework for API testing. For negative test cases where API returns error codes like 400,401,403. feign always throws an exception Is there any way I can catch Actual API response instead of feign exception and assert it.…
0
votes
1 answer

Spring Cloud Eureka + FeignClient + Ribbon : Load balancer does not have available server for client

I have Below Simple Setup. Spring Cloud Eureka Server- and Two Services PricingService and DiscountService. Pricing Service calls-> DiscountService. Server Setup @SpringBootApplication @EnableEurekaServer public class EurekaServerApplication { …
0
votes
0 answers

What needs to set for Configuration of a FeignClient

I am trying to override the default configuration for one of my FeignClient. However, there is a mismatch in the documentation so I don't know which one I should follow. In the section of Feign for Spring Cloud document (link here), it says the…
0
votes
1 answer

Preserving hostname on HATEOAS Resource with OpenFeign

I'm trying to add a URI to a resource located in a different microservice using OpenFeign and a ResourceAssembler, while preserving the hostname from the original request. When making a REST request to a HATEOAS resource in another microservice, the…
user11407387
0
votes
1 answer

How to not instantiate the feign client during tests?

when I start my test the feign client also starts so how to not Instantiate the Feign Client During Tests ?
Mohamed h
  • 1
  • 2
0
votes
0 answers

Is there a way to pass multiple base packages in annotation @EnableFeignClient

I'm currently using spring-cloud-starter-openfeign with 1.4.4.RELEASE version. I have annotated my main class with @EnableFeignClients and I have feign clients in multiple packages due to the structuring of the project. So I tried adding…
0
votes
1 answer

GET turning into POST with Spring Feign

I was facing an issue that my GET requests were being changed to POST due the RequestHeader and PathVariable that were being interpreted as body of the request in Feign Client. Interceptor public class OpenFeignConfiguration implements…
AMagyar
  • 5,108
  • 3
  • 13
  • 17
0
votes
3 answers

How can I test a my rest controller that has feign clients?

I have a rest controller that is using 2 fein clients, I want to write and test the Rest controller with different samples, I am not an expert at writing springboot tests. In this scenario I have no repositories to test with, just feign clients…
0
votes
1 answer

How to forward headers when using Zuul, Hystrix (and Feign) with Spring Cloud HATEOAS?

Context My micro-services application is based on spring-cloud: a zuul gateway is configured in front of two micro-services: service-a and service-b. One of my API requires that service-a requests service-b; I use feign for that. Zuul send…
0
votes
1 answer

Combined Mapping with Spring Data JPA and Feign

I have a ShopMicroService, a CustomerMicroService and a CartMicroService. The ShopMicroService should work as an API Gateway and should be able ton control every other service. They are connected and routed with Netflix Zuul. I want to be able to…
0
votes
4 answers

Feign with Hystrix Fallback throwing bean error on startup

I am working on an example from here about Feign and Hystrix. Without the Feign fallback property, everything works okay. But when I add the fallback property and create the fallback class that implements the feign clients interface, I get the…
IsaacK
  • 1,178
  • 1
  • 19
  • 49
0
votes
1 answer

Feign Client with PCF internal route

With Feign client I couldn't connect to an api endpoint hosted on internal route in PCF. Getting connection refused exception like below. Any advise on resolving this issue? feign.RetryableException: Connection refused (Connection refused)…
Minisha
  • 2,117
  • 2
  • 25
  • 56
0
votes
2 answers

Spring Cloud Kubernetes FeignClient Error

I am using spring cloud kubernetes with spring boot and necessary RBAC requirements needed for the project. org.springframework.cloud
0
votes
1 answer

EventListener and retryable

I would like to invoke some code after my application start. Is there any way to handle event: Started SomeApp in 14.905 seconds (JVM running for 16.268) I'm going to try if another application is up. I've tried to use Retryable but not its…
MrNetroful
  • 497
  • 8
  • 28