@PathVariable注解使用

Posted gzhbk

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了@PathVariable注解使用相关的知识,希望对你有一定的参考价值。

@PathVariable是spring3.0的一个新功能:接收请求路径中占位符的值

语法:

@PathVariable("xxx")
通过 @PathVariable 可以将URL中占位符参数xxx绑定到处理器类的方法形参中@PathVariable(“xxx“)

@RequestMapping(value=”user/id/name”)

---------------------
作者:sswqzx
来源:CSDN
原文:https://blog.csdn.net/sswqzx/article/details/84194979
版权声明:本文为博主原创文章,转载请附上博文链接!

以上是关于@PathVariable注解使用的主要内容,如果未能解决你的问题,请参考以下文章

@PathVariable注解和@RequestParam注解的区别

学习笔记——@PathVariable注解基本使用;@PathVariable注解属性;REST风格CRUD概述;实现PUT&DELETE提交方法步骤;SpringMVC处理请求数据请求头处理

@PathVariable注解的功能是什么呢?

Springboot@PathVariable注解使用--请求路径占位符

@RequestParam @RequestBody @PathVariable 之@requestBody注解的使用

@PathVariable@RequestHeader与@CookieValue注解的使用案例