I have an annotated controller that contains several tags displayed on URLs. Like this:
@Controller public class CategoryController { @RequestMapping(value = "/addCategories") public void addCategories(@RequestParam(value = "data") String jsonData) throws ParseException @RequestMapping(value = "/getNext") public void getNext(@RequestParam(value = "data") String jsonData) throws ParseException ... }
Methods need to parse the json request and perform some actions. The Parsing request may specify a ParseException , which I can handle in the method or add throws to my signature. I prefer the second approach, because in this I do not want to add try / catch code to the code. So, the question is how to configure and process the code for controller methods?
source share