Questions tagged [openfeign]

237 questions
1
vote
2 answers

How to autowire feign client (for external API) in a test?

I've written a simple Feign client, for calling an external API (running on a different server): @FeignClient( name = "test-service", url = "https://some-test-server.com/api" ) public interface TestClient { …
Ali
  • 261,656
  • 265
  • 575
  • 769
1
vote
0 answers

Load balancer does not contain an instance for the service [kubernetes environment]

I have few services deployed in EKS and some of them have issues to be reached. I have this exception: 2022-06-01 11:27:39.383 WARN 1 --- [nio-8080-exec-3] o.s.c.l.core.RoundRobinLoadBalancer : No servers available for service:…
1
vote
0 answers

How to convert key format from camelCase to kebab-case using @SpringQueryMap on Feign?

I'm using the @SpringQueryMap annotation on my Feign client and I need to convert the format of the key that will be used as query params data class MyQuery( val userId: String, val validAt: LocalDate ) interface Client { …
Rafa Acioly
  • 530
  • 9
  • 34
1
vote
0 answers

How to Get exact Rest API Error from Feign Client

I am new to Feign Client on Spring Boot, so please permit me. I am trying to make a network call with Feign Client using the code below fun validateAccessToken(accessToken: String?): ResponseEntity { val tokenConfirmationEndpoint…
ololo
  • 1,326
  • 2
  • 14
  • 47
1
vote
1 answer

Uploading a file using the Backblaze B2 API with OpenFeign

I'm using Spring Boot with OpenFeign and I'm trying to upload a file to Backblaze B2. I already have b2_authorize_account and the b2_get_upload_url endpoints working. Now I'm trying to send a request to b2_upload_file. The code I have for the Feign…
1
vote
1 answer

Feign client body type serialization failure with Jackson encoder

I'm working on implementing a Spring service and client and would like to use OpenFeign for the client. The client will be deployed with legacy applications that do not want to incur a dependency on Spring, so I'm using OpenFeign directly instead…
asm
  • 8,758
  • 3
  • 27
  • 48
1
vote
1 answer

Feign Client being ignored during component scan

I am creating a feign client to hit an external service. I added the following dependencies to my pom.xml
njari
  • 198
  • 1
  • 12
1
vote
2 answers

AWS XRay wrong service map when using OpenFeign with AppMesh and AWS Service Discovery

I'm testing interservice communication with Spring Boot Rest services deployed on AWS with AppMesh and Service Discovery enabled. To be able to send messages from service a to service b I've to use the OpenFeign client to generate a proxy…
1
vote
0 answers

Using enum as @PathVariable in FeignClient

I don't know how to make FeignClient working with enum serialization as @PathVariable. I have enum type representing Access Type: public enum StorageFileAccessType { TOKEN(0), SMSCODE(1); private final int id; private…
manix
  • 11
  • 4
1
vote
1 answer

RestTemplate vs. OpenFeign. OpenFeign is it just a possibile alternative to RestTemplate or exist use cases where it have do be used?

as a Spring developer I always used SpringTemplate in order to perform REST call. Today studying on a Udemy course about micro services implementation using Spring Boot I discovered this Open Feign. I understood that it have a declarative style and…
AndreaNobili
  • 40,955
  • 107
  • 324
  • 596
1
vote
0 answers

spring-cloud-starter-openfeign throwing build/resolve error for all other dependencies when added

I am new to Micro-services and was following a course on it. Adding spring-cloud-starter-openfeign maven dependency throws a build error and all the other dependencies start complaining about resolve issues. I am using latest Spring Boot- 2.6.0…
1
vote
1 answer

reactive feign client global retry

I am switching from feign client to reactive feign client, I have defined global retryer for feign: @Bean Retryer retryer() { return new Retryer.Default(100, 1, 5); } @Bean ErrorDecoder errorDecoder() { return new…
Patrik
  • 77
  • 8
1
vote
0 answers

Sending XML Strings As POST Params

I'm building a service that sends a POST request to UPS track package API. In PostMan, this call returns a 200 with this URL and these POST params URL: https://onlinetools.ups.com/ups.app/xml/Track Body: form-data Params: UPSSecurity
wdrew
  • 11
  • 1
1
vote
0 answers

how to make FeignClient handle custom id field in parameter?

This is my feign method @RequestMapping(method = RequestMethod.DELETE, value = "/spaces/{spaceId}") void deleteSpace(SpaceId spaceId); and SpaceId field is public class SpaceId implements Serializable { @JsonValue String id; } What I want is…
mmdc
  • 1,677
  • 3
  • 20
  • 32
1
vote
1 answer

feign client multipart/form-data POST request giving 400 Bad Request

I am trying to raise a feign client post request where I need to pass a JSON (multi-line text) and not a file. I am passing the content-type as multipart/form-data. And in my method, I am passing a POJO (containing all the fields that will be in the…
the_novice
  • 105
  • 7