例如springmvc,接口定义如下,deleteByIds接收数据类型参数
public Integer deleteByIds(@RequestParam String[] ids){
    return 1;
}

@RequestParam,用来处理请求头Content-Type: 为 application/x-www-form-urlencoded编码的内容。(Http协议中,如果不指定Content-Type,则默认传递的参数就是application/x-www-form-urlencoded类型)。所以,针对postman,必须选择正确的请求头。

在选择正确的请求头后,下面两种方式的传参,都可以成功被后台获得。

方法一

postman与spring mvc参数调试,数组类型参数

方法二

postman与spring mvc参数调试,数组类型参数

 

相关文章: