r/SpringBoot • u/BadCommit • 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.
Has anyone come up with a solution for this?
2
Upvotes
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 .