作用
REST
风格接口参数获取
代码
@RequestMapping("/testPathVariable/{id}")
public String testPathVariable(@PathVariable("id") Integer id)
{
System.out.println("testPathVariable:"+id);
return SUCCESS;
}
REST
风格接口参数获取
@RequestMapping("/testPathVariable/{id}")
public String testPathVariable(@PathVariable("id") Integer id)
{
System.out.println("testPathVariable:"+id);
return SUCCESS;
}
本文标题:PathVariable注解
本文链接:https://www.haomeiwen.com/subject/jlpqjltx.html
网友评论