Skip to content

Migrate responseBodyAdvice test to Jackson 3 converter - #36920

Merged
bclozel merged 1 commit into
spring-projects:mainfrom
froggy0m0:migrate-response-body-advice-jackson-json
Sep 4, 2026
Merged

bclozel merged 1 commit into
spring-projects:mainfrom
froggy0m0:migrate-response-body-advice-jackson-json

Conversation

@froggy0m0

@froggy0m0 froggy0m0 commented Jun 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jun 14, 2026
@froggy0m0

Copy link
Copy Markdown
Contributor Author

@sbrannen, could you please take a look at the direction here?

This PR addresses the existing TODO by migrating the test from
MappingJackson2HttpMessageConverter to JacksonJsonHttpMessageConverter.

I also made sure to preserve the existing gh-22638 coverage for ResponseBodyAdvice.

Since Jackson 2 support is planned to be removed in 7.2, could you advise whether migrating
this test now is premature, or if you would prefer a different approach?

I'm happy to adjust the PR based on your feedback.

@bclozel bclozel added the in: web Issues in web modules (web, webmvc, webflux, websocket) label Sep 4, 2026
Migrate RequestMappingHandlerAdapterTests#responseBodyAdvice from the
deprecated MappingJackson2HttpMessageConverter to
JacksonJsonHttpMessageConverter.

The test advice now implements ResponseBodyAdvice directly and returns a
map body that is written by the selected converter.

This maintains the test coverage for spring-projectsgh-22638, verifying that a
ControllerAdvice implementing both ResponseBodyAdvice and
RequestBodyAdvice is not registered twice.

Signed-off-by: Sunghyun Shin <froggy0m0a@gmail.com>
@bclozel bclozel self-assigned this Sep 4, 2026
@bclozel bclozel added type: task A general task and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Sep 4, 2026
@bclozel
bclozel force-pushed the migrate-response-body-advice-jackson-json branch from 930981b to 19fdc0b Compare September 4, 2026 16:23
@bclozel
bclozel merged commit 19fdc0b into spring-projects:main Sep 4, 2026
2 checks passed
@bclozel bclozel added this to the 7.1.0-M2 milestone Sep 4, 2026
@froggy0m0

Copy link
Copy Markdown
Contributor Author

Thanks for reviewing and merging this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: web Issues in web modules (web, webmvc, webflux, websocket) type: task A general task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants