《一头扎进SpringMvc视频教程》Rest风格的资源URL

  

5、@PathVariable和@RequestParam的区别 

请求路径上有个id的变量值,可以通过@PathVariable来获取  @RequestMapping(value = "/page/{id}", method = RequestMethod.GET)  
@RequestParam用来获得静态的URL请求入参     spring注解时action里用到。

原文地址:https://www.cnblogs.com/rogge7/p/7050808.html