![](/img/trans.png)
[英]Spring issues after changing resource to consuming MULTIPART_FORM_DATA
[英]Postman: Create complex MULTIPART_FORM_DATA request
我需要使用郵遞員創建一個請求。 Spring Boot端點是:
@RequestMapping(
value = "/group",
method = RequestMethod.POST,
consumes = MediaType.MULTIPART_FORM_DATA_VALUE
)
public ResponseEntity<String> group(
@RequestPart("items") List<ItemType> items,
@RequestPart("group") GroupType group);
哪里:
public class ItemType {
private String description;
private String security;
private Date bestdate;
private MultipartFile content;
}
public class GroupType {
private String description;
private String security;
private String metadata;
}
如您所見, ItemType
包含一個MultiPartFile
。
我的意思是,我需要在"items"
和"group"
部分上寫些什么:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.