I have an endpoint for retrieving all objects from a given table / data _type. I want to add some filtering capabilities for the returned data, but I cannot figure out how to pass the JSON object to my controller.
my code is:
@RequestMapping(value = "/{dataType}.json", method = RequestMethod.GET) public @ResponseBody List findAll(@PathVariable String dataType, @RequestParam(required=false) Map<String, Object> query) { }
How to pass data to the request parameter? I tried @ModelAttribute and sent a JSON object to the request body, but that didn't work.
Please help me figure this out.
source share