I have a controller mapped with the following annotation:
@RequestMapping(value = \"/json\", method = RequestMethod.GET, produces = \"application/json\") @Re
Use jackson library and @ResponseBody annotation on return type for the Controller.
@ResponseBody
This works if you wish to return POJOs represented as JSon. If you woud like to return String and not POJOs as JSon please refer to Sotirious answer.