当前位置: 代码迷 >> Web前端 >> @PathVariable跟@RequestParam的区别
  详细解决方案

@PathVariable跟@RequestParam的区别

热度:89   发布时间:2012-07-02 17:46:22.0
@PathVariable和@RequestParam的区别
请求路径上有个id的变量值,可以通过@PathVariable来获取

[java] view plaincopyprint?
@RequestMapping(value = "/page/{id}", method = RequestMethod.GET) 

@RequestParam用来获得静态的URL请求入参

spring注解时action里用到。