@PathVariable主要作用:映射URL绑定的占位符
带占位符的URL是 Spring3.0 新增的功能,URL中的 {xxx} 占位符可以通过 @PathVariable(“xxx”) 绑定到操作方法的入参中。
例如:
假如你的请求为localhost:8080/user/admin,可以输出:
@PathVariable主要作用:映射URL绑定的占位符
带占位符的URL是 Spring3.0 新增的功能,URL中的 {xxx} 占位符可以通过 @PathVariable(“xxx”) 绑定到操作方法的入参中。
例如:
假如你的请求为localhost:8080/user/admin,可以输出:
上一篇:java中的异或运算
下一篇:JS中==与===区别
linux之信号概念详解
@RequestParam @RequestBody @PathVariable 等参数绑定注解详解1、 @Pat
@PathVariable和@RequestParam的区别请求路径http://localhost:8080/Springmvc/us
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M