@RequestParam属性
时间: 2023-10-15 22:26:15 浏览: 82
SpringMVC注解@RequestParam方法原理解析
@RequestParam 是一个常用的注解,用于将指定的请求参数赋值给方法中的形参。它通常用在Controller层的方法参数上,用来解决前端与后端参数不一致的问题。@RequestParam可以接受简单类型的属性,也可以接受对象类型。当前端传入的是json字符串时,后台可以按字符串类型的参数接收并解析。另外,@RequestParam注解还可以设置请求头的contentType属性,比如设置为application/x-www-form-urlencoded;...。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [@RequestParam注解的详细介绍](https://blog.csdn.net/yz18931904/article/details/124078696)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [@RequestParam和@Param的区别](https://blog.csdn.net/weixin_48016395/article/details/123962409)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [springboot后台接收axios传递的json数据为null](https://download.csdn.net/download/weixin_38616505/14916089)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文