Questions tagged [openfeign]

237 questions
0
votes
1 answer

how to authenticate users managed by keycloak in Spring Shell CLI app and store the token retrieved securely

Im developing a spring shell app whose main job is to make requests to a Spring boot rest API and display the results to the user. The problem is the users of the rest API are managed by keycloak, meaning I have to authenticate the CLI user to send…
someone
  • 1
  • 2
0
votes
1 answer

Fiegn Client not picking service url from Eureka Service

I have just started with microservices and to learn I am working on this project The problem is although my services are registered at Eureka Server. OpenFeing is not picking up the url. It is picking up the service name instead for the url. The…
Danish Javed
  • 369
  • 1
  • 3
  • 10
0
votes
1 answer

RibbonClient is not working. Field required a bean of type that could not be found

Error : Field proxy in com.project.currencyconversionservice.CurrencyConversionController required a bean of type 'com.project.currencyconversionservice.CurrencyExchangeServiceProxy' that could not be found. Main…
0
votes
0 answers

How to create feign clients with different urls for the same interface

I had a Feign Client created with SpringFramework openFeign, but wanted to hit the same rest end points with a different environment url. As I set the url at the annotation, wanted to check if there is some other way to do this. Feign Client through…
0
votes
1 answer

feign client transitive dependency vulnerability issue apache commons fileupload 1.4 in gradle

In one of the project, I am using spring cloud starter openfeign 3.1.2 which is internally using apache commons fileupload 1.4. Blackduck is raising vulnerability issue with apache commons fileupload 1.4, so I need to use apache commons fileupload…
0
votes
3 answers

How to send/set basic authorization i.e user and password to every request in openFeign client in spring boot with help of interceptor

How to send or set basic authorization, i.e., user and password, to every request in the openFeign client in Spring Boot with help for the interceptor As I am trying to implement an openFeign client for an external service in spring boot, which…
0
votes
0 answers

Custom configuration not taken into effect for feign client using @FeignClient

I am trying to introduce a custom decoder in order to throw appropriate exceptions rather than the generic Feign.Retryable exception and for that I wanted a custom decoder. Following the documentation:…
Adi
  • 23
  • 4
0
votes
0 answers

Feign client doesn't recognize HTTP method when injected from another project

I created a feign client in an item service, and I'm injecting it via a dependency in service A. @FeignClient(name = "item", url = "${service.item.url}") public interface ItemsClient { @RequestLine("POST /items") void…
0
votes
0 answers

using one feign client to call multiple endpoints with different authentication

I am trying to use same feign client to call/POST different endpoints (endpoint1, endpoint 2 etc) with below (payload structure is same. One can assume that number of endpoint would continue to remain 3 [say] for the deployed app); Endpoint 1 -…
Arpit S
  • 137
  • 2
  • 10
0
votes
1 answer

API response return different structure cause conversion error

I have this json response back from API: With result: { "Result": {"name":"Jason"}, "Status": 1 } Without result: { "Result": "Not found", "Status": 1 } As you can see the format the different. When using Feign when not found I will…
Alvin
  • 8,219
  • 25
  • 96
  • 177
0
votes
1 answer

Setting timeout to OpenFeign client

I'm trying to setup a timeout to my feign clients when they try to access to other of my services. In order to test my circuit breaker method. This is my basic setup. I'm using spring-boot 3.0.2 and spring cloud version 2022.0.1 I have a…
0
votes
0 answers

Error handling with feign client - resilence4j

My spring boot app has a feign client that POST a payload to external endpoint. There is requirement to audit all the calls, especially when any errors occurs in calling the endpoint (connection, unauthorized etc), after retry are exhausted. To…
Arpit S
  • 137
  • 2
  • 10
0
votes
0 answers

How to send JSON request with single string value in body with Spring Cloud OpenFeign

I'm declaring FeignClient with Spring Cloud OpenFeign version 4.0.1. The API I'm calling expects in request body primitive JSON string value (e.g. "something") as a string in quotes. But I'm struggling with implementing it using Feign. Code…
kyberpunk
  • 1
  • 1
0
votes
0 answers

OpenFeign POST request with dynamic header and x-www-form-urlencoded body

I'm trying to send a POST request with dynamic authorization header and form-urlencoded body but I'm getting this exception: Caused by: java.lang.IllegalStateException: Method has too many Body parameters: public abstract…
dev-rifaii
  • 217
  • 2
  • 9
0
votes
0 answers

Using single feign client for multiple endpints

There is requirement to basically POST messages to REST endpoint to desired customer (out of fixed customer list, as below : Inbound Message I (has customer info) ---> Customer 1 ---(POST JSON)--> REST Endpoint 1 (basic auth) Inbound Message II…