Skip to content

Jackson properties may not be applied correctly to RestClients #49223

@mheath

Description

@mheath

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.

Metadata

Metadata

Assignees

Labels

type: regressionA regression from a previous release

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions