I have a Hibernate project taken from here: Spring 4 MVC+Hibernate 4+MySQL+Maven integration
The problem is that the return value calls a JSP page and not displaying the returned string as a JSON.
I've tried putting:
@RequestMapping(value = "/", method = RequestMethod.GET, produces = { MediaType.APPLICATION_JSON_VALUE })
@ResponseStatus(HttpStatus.OK)
but still it tries calling the JSP page named by the return statement, and not displaying it in the browser (resulting in 404).
How can I change it to return a JSON?