/** * This is an action method to query all states according to country id * * @param countryId * @return * @throws Exception */ @RequestMapping("/queryStates") public @ResponseBody List<State> queryStates(@RequestParam Integer countryId) throws Exception { List<State> states = testService.queryAllStates(countryId); return states; }