@RequestParam 注解是用来将请求参数绑定到控制器方法参数上的注解。使用方法如下:
@RequestMapping(value = "/getUser")
public String getUser(@RequestParam("id") Long id, Model model) {
User user = userService.getUserById(id);
model.addAttribute("user", user);
return "showUser";
}