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
0 answers

@FeignClient is not working with @Autowired in spring boot

I have a feign client: @FeignClient(name="admit-card-service") public interface CallFeignClient { @GetMapping("centers") public List getCenterList(); } which I'm calling from @RestController public class ClientController { …
0
votes
0 answers

How can i invoke a lambda function that involves spring cloud feign from an SQS trigger

I need to invoke an AWS lambda function using an SQS trigger. The lambda function needs to include spring boot features - because it needs to transform the message from SQS into another input form and then call an external REST API using spring…
0
votes
0 answers

FeignClient exception in Spring Boot Microservices status 302

i have a problem with FeignClient. Right now, I have authentication & authorization via okta. I have 3 services(one is api-gateway, one is discovery service - Eureka and one is backend). In api-gateway I have declared backend…
Hubert Bratek
  • 894
  • 10
  • 30
0
votes
1 answer

Feign check body is not empty

I use Feign in my micro service. Sometimes my code gets (as response from remote client) 200 OK with body, but sometimes 204 without and I got here NPE. Is it possible to set body by default? or check whits is respose code and dont wait for body…
EK.
  • 2,890
  • 9
  • 36
  • 49
0
votes
1 answer

Programmatically created Feign client and Eureka target

I have started a few days ago to learn about fault tolerance solutions in microservices. I have some microservices in my ecosystem and they are now interconnected with Eureka service lookup. I used FeignClient to call from one to another. As I heard…
newhouse
  • 1,152
  • 1
  • 10
  • 27
0
votes
0 answers

Integration Spring Reactive with Spring MVC + MySQL

Trying to figure out if I can use Spring Reactive (Flux/Mono) with Spring MVC ? The structure of microservices using Spring MVC + Feign Client, Eureka Server (Netflix OSS), Hystrix, MySQL database. My first microservice addDistanceClient adds data…
0
votes
1 answer

Using @FeignClient with OAuth2Authentication in Javaclient

I would like to use a @FeignClient in a simple spring boot application (CommandLineRunner) to call a microservice endpoint. How can I provide an OAuth2Authentication to call a protected endpoint like helloUser() ? @FeignClient(name =…
pesche666
  • 139
  • 1
  • 13
0
votes
1 answer

Spring cloudFeignClient send header programmatically in RequestInterceptor

i'm working on a spring boot project where i should call a rest api using Feign via Spring Cloud, i can call the rest api using feignClient without any problem, now the rest api that i call needs a JWT to let me consume it, to send a JWT from my…
James
  • 1,190
  • 5
  • 27
  • 52
0
votes
1 answer

Share circuit breaker over multiple feign clients

For an application that has multiple feign clients connecting all to the same external component we want one shared circuit breaker. How can this be achieved with spring-cloud-starter-openfeign? Detailed explanation: When the providing service is…
Jeff
  • 1,871
  • 1
  • 17
  • 28
0
votes
1 answer

Setting up Feign in Jhipster behind a SSL socket

I have set up a Gateway-Microservice configuration in JHipster, and I cannot seem to get the microservice to communicate to the gateway using FeignClient Everything worked fine until I started following these instructions…
Chris
  • 45
  • 2
  • 6
0
votes
1 answer

Catch error state of a Feign client in calling code and report error upstream

I have a REST controller which triggers downstream REST calls through Feign clients. When any kind of error (bad reply, timeout etc.) happens in the downstream, I would like to know the reason and generate REST reply with error data, as show…
onkami
  • 8,791
  • 17
  • 90
  • 176
0
votes
2 answers

How to use feign interceptor / decoder to log request - response in custom format?

I'm developing a custom logging framework for springboot to log rest-template requests and response and is working fine. Am trying to implement the same for 'Feign-Client' and am faced with couple of issues. For request logging, am leveraging…
Muthu
  • 11
  • 1
  • 4
0
votes
1 answer

The OAuth2 authenticated feign client doesn't support be invoked in an asynchronous method?

I am developing a spring cloud project with Feign and OAuth2.In the project, there are some time-consuming operations and some requests will be sent when these operations is finished. In order to achieve a better user experience, these operations…
JerryYuan
  • 1
  • 1
0
votes
1 answer

Spring Feign configuration: how to test all @Bean methods are called

I want to configure Spring feign with a configuration class, and I want to make sure that all the @Bean methods are called when Spring configures the feign client for me. How to test it? For example, I have: @FeignClient( name =…
WesternGun
  • 11,303
  • 6
  • 88
  • 157
0
votes
1 answer

Spring Open-Feign fails to start with more than one spring.application.name used in Config-client

In my application we use spring cloud config where we host file backed properties like below Config…