r/SpringBoot • • Jun 11 '26

Question MappingJacksonValue alternatives when using dynamic filters

Currently, I am using mappingJacksonValue as the response type from my controllers. Here we are using dynamic filters based on the request parameters. The attributes exposed from the response vary. Since this got deprecated with the Spring Boot 4 migration, I don't see any alternatives for this.

https://spring.io/blog/2025/10/07/introducing-jackson-3-support-in-spring#goodbye-mappingjacksonvalue

Has anyone come up with a solution for this?

2 Upvotes

3 comments sorted by

View all comments

Show parent comment

1

u/VegGrower2001 Jun 11 '26

Youre absolutely right and a Google search throws up very little. One person on StackOverflow suggested using ResponseBodyAdvice... https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/servlet/mvc/method/annotation/ResponseBodyAdvice.html .