I've just upgraded to Spring Boot 2.5.12 and I noticed a regression in the @JsonView annotation support. Previously, it used to work by annotating the whole class, while after the upgrade I had to explicitly annotate the individual methods, since on a class level it gets somehow ignored.
See the demo app I've created here https://github.com/gkgeorgiev/spring-jsonview-bug
Thanks!
Comment From: simonbasle
Can you specify with which version you managed to make the provided example work ?
The JsonViewResponseBodyAdvice
has been around since 2014 and from what I can see it always looked at the method level to look for the JsonView
annotation, never at the class level...
Comment From: gkgeorgiev
@simonbasle ... It's been so long that unfortunately I don't have this information anymore.
Comment From: rstoyanchev
Please, specify the version you're upgrading from, or better yet change the demo project to show it working with @JsonView
at the class level. That's not something we expect should have worked, so there is something less than obvious going on.
Comment From: spring-projects-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: spring-projects-issues
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.