Conversation
Upgrade Jersey to 4.0.3 and make Jackson 3 the default JSON mapper. Keep Jackson 2 support via spring.jersey.preferred-json-mapper=jackson2, and apply the preference to both application and Actuator endpoints. Closes spring-projects#51931 Signed-off-by: Kristoffer Larsen Hopland <24739853+khopland@users.noreply.github.com>
|
Oh, I didn’t notice #51935 had already been opened when I created this PR. Both PRs upgrade Jersey to 4.0.3 and make Jackson 3 the default. With #51935, you switch back to Jackson 2 by replacing dependencies. Here, both versions are included, and you can choose with I also added tests for Actuator-only applications and separate management ports. In local testing, an Actuator-only app using Supporting both providers makes this PR bigger. I’m happy to simplify it so switching to Jackson 2 requires replacing dependencies, while keeping the Actuator fixes and regression tests. |
|
A question i have is how a user should select what jackson version jercey should use, i have added the prop |
eThe Jersey starter currently uses Jackson 2, so Jersey responses do not use Spring Boot’s default Jackson 3 mapper and configuration.
This change upgrades Jersey to 4.0.3 and uses Jackson 3 by default. Jackson 2 remains available through
spring.jersey.preferred-json-mapper=jackson2like other starters. The preference applies to application and Actuator endpoints, including when Jackson features are already registered.Adds tests for both mapper versions and Actuator configurations. Jersey module, starter, smoke, and Actuator integration checks pass.
Closes #51931