Custom QueryParameters values with SpringQueryMap and OpenFeign

Viewed 275

Is there a way for sending custom query parameters using @SpringQueryMap annotation together with OpenFeign? Here's an example:

public class PersonStatus {`
  @JsonProperty("person.active=true")
  String isActive;
  @JsonProperty("person.active=false")
  String isNotActive;
}`

Where in the OpenFeign call, we invoke this way:

@GetMapping(value = "/active", consumes = "application/json")
ResponseEntity<List<Person>> queryProductRecommendation(@SpringQueryMap PersonStatus personStatus);

However when i check my invocations, I can see that the query parameter name that is being set is the attribute's name (isActive) and not the custom name of the attribute (person.active=true).

0 Answers
Related