-
Notifications
You must be signed in to change notification settings - Fork 41.9k
Jackson properties may not be applied correctly to RestClients #49223
Description
When a @AutoConfiguration uses after... with the RestClientAutoConfiguration, any spring.jackson. properties get lost in the JsonMapper used by the HttpMessageConverter.
I have created a project that distills this issue down to a single class (and supporting autoconfig import file) using Boot 4.0.3-SNAPSHOT in this project at https://github.com/mheath/boot-autoconfig-ordering-json-mapper-restclient-bug. When you debug the BugApplication class (in IntelliJ at least) you can inspect the RestClient object and see that the JsonMapper in the HttpMessageConverter does not contain the Jackson deserialization configuration set as a property within the test class.
I believe that HttpClientAutoConfiguration should explicitly happen after the HttpMessageConvertsAutoConfiguration but that is just a theory.