list集合(List<Long> shopIds) , 不同注解,在postman有着不同的传参方式

 

@RequestBody注解方式
这个注解的传参一般都在Body里传值的
postman List<Long> 的几种传参方式

 外部千万别写大括号,如何这个集合在某类中的话就要指定集合名称

 

postman List<Long> 的几种传参方式

 

@RequestParam注解方式
postman List<Long> 的几种传参方式

多个以逗号隔开 

 

postman List<Long> 的几种传参方式

 

附加

在某类中的接收参数

private String riderEvaluationLabel = new ArrayList<>().toString();

postman的传值方式

postman List<Long> 的几种传参方式

 

如:private List<Shop> shopList;

postman List<Long> 的几种传参方式

不管它有多少个键,使用逗号分开就好了,如果集合中还嵌套着集合也是一样的写法,叠加起来就行。注意类型区分

postman在Body里的JSON参数格式化快捷点: shift+alt+F

 

相关文章:

  • 2021-05-16
  • 2022-01-13
  • 2022-03-03
  • 2021-11-22
  • 2022-12-23
  • 2022-12-23
  • 2021-09-09
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
  • 2022-01-22
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案