【发布时间】:2021-08-12 18:36:43
【问题描述】:
我有这个 API 方法
public ResponseEntity<ApiResponse> createProducts(@RequestPart @Valid ProductRequest productRequest, @RequestPart List<List<MultipartFile>> imageList) { }
现在我想通过邮递员发送 imageList 我该如何发送
【问题讨论】:
-
我想这应该是
public ResponseEntity<ApiResponse> createProducts(@RequestPart @Valid ProductRequest productRequest, @RequestPart List<MultipartFile> imageList1, @RequestPart List<MultipartFile> imageList2) { }。如果您不知道 imageList 的数量,则需要从 HttpRequest 获取部件 -
@grekier 问题是我不知道它没有固定的数字
-
你能告诉我如何使用 HttpRequest
标签: java spring-boot postman