how to get request parameter in spring boot controller code example
Example 1: spring mvc get all request parameters
@RequestMapping(value = {"/search/", "/search"}, method = RequestMethod.GET)
public String search(@RequestParam Map<String,String> allRequestParams) {
return "viewName";
}
Example 2: spring boot param object
@RequestMapping("/{someID}")
public @ResponseBody int getAttr(@PathVariable(value="someID") String id,
@RequestParam String someAttr) {
}