Affects: \6.1.1
RestClient exchange configuration for null values
I'm trying to use spring-boot 3 new feature of Exchange interface to create client API.
@GetExchange( "cities")
List<Commune> cities(@RequestParam(value = "postCode", required = false) String postCode)
Previously with RestTemplate, query params with null values where not sent.
Now it seems that null values are always sent, and I can't find where I can change this behavior.
Comment From: snicoll
You've mentioned RestClient
but you haven't shown how the proxy was created. It could be something in the adapter or elsewhere. HttpServiceProxyFactory
can also be created with a RestTemplateAdapter
if you want to check this feature against RestTemplate
.
To investigate in more details, please share a small sample that we can run ourselves. You can attach a zip to this issue or push the code to a separate GitHub repository.
Comment From: gideruette
Sorry for disturb, the problem actually appears only on null fields in request body when serializing in form data.