![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
request
宫永伟
正统
展开
-
PathVariable 和 RequestParam的区别
PathVariable 映射 URL 绑定的占位符 通过 @PathVariable 可以将 URL 中占位符参数绑定到控制器处理方法的入参中:URL 中的 {xxx} 占位符可以通过@PathVariable(“xxx“) 绑定到操作方法的入参中。 @RequestMapping("/testPathVariable/{id}") public String testPathVari...原创 2019-03-28 16:51:27 · 535 阅读 · 0 评论 -
spring+@RequestBody访问
概念 @RequestBody的注解是一个spring中很实用的功能,它能帮我们解析客户端(移动设备、浏览器等)发送过来的json数据,并封装到实体类中。 细节 content-type @requestBody注解常用来处理content-type不是默认的application/x-www-form-urlcoded编码的内容,比如说:application/json或者是applicatio...原创 2019-03-28 17:19:43 · 488 阅读 · 0 评论