@RequestParam和@PathVariable区别与使用
网上看到总结的内容:
@RequestParam与@PathVariable为spring的注解,都可以用于在Controller层接收前端传递的数据,不过两者的应用场景不同。
1.@RequestParam
在后台获取前段数据有两种方式:
一种是request.getParameter(“name”),另外一种是用注解@RequestParam直接获取.
request.getParameter...
原创
2019-07-30 15:25:57 ·
383 阅读 ·
0 评论