postman测试传入List<String>参数方式
作者:烟萝 时间:2022-10-13 01:34:40
postman测试传入List<String>参数
第一步:设置headers
Content-type 的值为application/json
第二步:传值参数list<String>
在body中,传值参数,list<String> 使用[]括起来
第三步:
controller层设置两个注解@ResponseBody 和@RequestBody
@ResponseBody 没有该注解的时候,会发生postman 请求找不到error 404;
@RequestBody 没有该注解的时候,会发生参数值传输不过去;
使用postman传List参数
1、后台部分
2、postman部分
如果不适用注解的话,可能会抛出
No primary or default constructor found for interface java.util.List
来源:https://blog.csdn.net/qq_31123505/article/details/90475241
标签:postman,List,String
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
解决微服务feign调用添加token的问题
2023-09-11 09:38:05
![](https://img.aspxhome.com/file/2023/1/58331_0s.jpg)
java中map和对象互转工具类的实现示例
2023-06-05 11:08:30
![](https://img.aspxhome.com/file/2023/2/62162_0s.png)
SpringBoot JdbcTemplate批量操作的示例代码
2023-05-15 21:46:42
java中Vector类的常用方法详解
2023-11-26 10:29:07
![](https://img.aspxhome.com/file/2023/4/60234_0s.png)
ElasticSearch添加索引代码实例解析
2023-11-21 03:41:04
![](https://img.aspxhome.com/file/2023/3/59543_0s.png)
Java 用Prometheus搭建实时监控系统过程详解
2023-09-06 12:07:40
![](https://img.aspxhome.com/file/2023/0/58470_0s.jpg)
用Flutter开发自定义Plugin的方法示例
2023-07-05 00:19:40
![](https://img.aspxhome.com/file/2023/3/99793_0s.png)
如何将javaweb项目部署到linux下
2023-11-11 11:45:11
Android编程基于自定义View实现绚丽的圆形进度条功能示例
2023-07-24 17:13:26
![](https://img.aspxhome.com/file/2023/7/84737_0s.png)
SpringBoot 配置文件加密的步骤
2023-10-23 02:55:55
简单谈谈Java中的栈和堆
2022-07-30 05:33:01
![](https://img.aspxhome.com/file/2023/3/61163_0s.png)
Java中的OkHttp使用教程
2023-08-10 19:30:59
android使用flutter的ListView实现滚动列表的示例代码
2023-06-26 09:00:13
![](https://img.aspxhome.com/file/2023/8/97858_0s.gif)
Maven插件的安装及使用
2022-04-05 04:38:30
![](https://img.aspxhome.com/file/2023/5/64155_0s.jpg)
springboot+springsecurity如何实现动态url细粒度权限认证
2023-10-01 04:06:39
![](https://img.aspxhome.com/file/2023/0/64130_0s.png)
Java新API的时间格式化
2023-02-14 19:24:37
![](https://img.aspxhome.com/file/2023/9/65319_0s.png)
java生成XML的方法
2023-08-12 11:45:46
C# GDI+实现时钟表盘
2023-06-20 07:11:32
![](https://img.aspxhome.com/file/2023/7/66117_0s.jpg)
java实现单机版五子棋
2022-12-20 20:15:07
![](https://img.aspxhome.com/file/2023/9/63379_0s.jpg)
微信跳一跳辅助Java代码实现
2022-03-31 19:12:03