-
Notifications
You must be signed in to change notification settings - Fork 38.7k
class level support for @JsonView in JsonViewResponseBodyAdvice #35350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This commit also includes related refinements of JdbcTemplate#getSingleColumnRowMapper and ObjectUtils#addObjectToArray. Closes spring-projectsgh-35340
Hey @asifebrahim, I am not sure to understand why you closed this PR which seems to fix #35343 before we had a chance to review it. Could you explain? |
i thought someone else was assigned to it so that's why..I'll reopen |
return super.supports(returnType, converterType) && returnType.hasMethodAnnotation(JsonView.class); | ||
return super.supports(returnType, converterType) && | ||
(returnType.hasMethodAnnotation(JsonView.class) || | ||
returnType.getDeclaringClass().isAnnotationPresent(JsonView.class)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should @JsonView
on super type be considered?
After more thoughts and discussion with the team, we prefer to decline this feature originally proposed in #35343 because the |
Made the necessary changes with a test file
Closes 35343
Signed-off-by: Asif Ebrahim [email protected]