The following are the list of parameters supported by the @RequestParam annotation:
Let’s look at the below request URL: http://localhost:8080/springmvc/hello/101?param1=10¶m2=20 @RequestMapping("/hello/{id}") public String getDetails(@PathVariable(value="id") String id, @RequestParam(value="param1", required=true) String param1, @RequestParam(value="param2", required=false) String param2) { ....... }
@RequestMapping("/hello/{id}") public String getDetails(@PathVariable(value="id") String id, @RequestParam(value="param1", required=true) String param1, @RequestParam(value="param2", required=false) String param2) { ....... }
There was an error while loading. Please reload this page.