-
Notifications
You must be signed in to change notification settings - Fork 56
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
ControllerAdvice are ignored and unexpected XML encoding #55
Comments
zifnab87
changed the title
ControllerAdvice conflict and unexpected XML encoding
ControllerAdvice are ignored and unexpected XML encoding
Jan 4, 2018
zifnab87
added a commit
to zifnab87/json-view
that referenced
this issue
Jan 18, 2018
… as the API is really strict monitorjbl#55
zifnab87
added a commit
to zifnab87/json-view
that referenced
this issue
Jan 18, 2018
zifnab87
added a commit
to zifnab87/json-view
that referenced
this issue
Jan 18, 2018
@zifnab87 I have encountered this issue and could you please create a merge request. |
@amit-gshe I didn't create a pull request since what I did is really messy and hacky - here is the diff from my old fork: master...zifnab87:master |
Hi there, I am also facing this issue. After json view is executed, @controlleradvice logic is not called. Please provide fix asap |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi!
This seems to be the most elegant way to programmatically change json views based on user roles! Thank you for your work!
Unfortunately as soon as I add
my
@ControllerAdvice
classes stop being applied.e.g I have a controllerAdvice that makes all the responses look like
{ content: [ ] }
even if they are single objects and I definitely need those to be working :)On top of that for some reason any end-point that has data that doesn't go through code like that:
is sending back XML! Even if it is a Hibernate Page object
{content: [], total: [], pagination: { } }
it is converted to XML.. while this was not needed in the past I had to add Accept headers in all the client requests to stop this from happening and have all of those as JSON again.I am using Spring 5:
From what I can tell it has to do with this part of code:
Thanks!
The text was updated successfully, but these errors were encountered: