I have this issue where I coded a controller and i returning a Response (endpoint consumes and produces json) as follows:
when i return something, controller is converting the whole response into json, i know is logical, but i have the same controller in another old project and as it is it works, i mean the controller returns the http status and only the json i'm returning
This is the code of one return
If test the endpoint through postman, it returns a huge json and just one child of the json, the entity is what i need to return, so what am i doing wrong...
This is the old controller that is currently working fine (i know there are a whole different libraries like swagger and version that behaves different)
Peter Rooke I don't get what you said, you said 'depend upon what's on the runtime classpath' ? by runtime you mean the application server ? do you mean the library classpath of the project, have no idea what you're talking about...
Dave Tolls, yes thanks, that's what i did, i changed it to return a string, and to modify the http status i injected HttpServletResponse and then modify the status from there, thanks.