我正在将 map 数据发布为 ArrayList。 所以我用Raw body尝试过。但我需要将其作为表单数据发布。 我尝试了很多方法,但没有得到结果。如果有人知道解决方案,该怎么做。请给我解决方案。
这是我的代码,亲爱的。
@Id
private String id;
@Field(value = "name")
private String name;
@Field(value = "description")
private String description;
@Field(value = "attributes")
private List<Map<String, String>> attributes = new ArrayList<Map<String, String>>();
this is what i am sending in Body Raw i want to post it by Form-Data
{
"name":"Fourth Template",
"description":"covers most of selected attributes",
"attributes": [
{
"attributeId": "5d4284807748181cbc8a8277",
"selectedDataSource": "collections"
},
{
"attributeId": "5d4284807748181cbc8a8277",
"selectedDataSource": "paycom"
},
{
"attributeId": "5d4284807748181cbc8a8277",
"selectedDataSource": "originations"
}
]
}
最佳答案
关于java - postman 如何将 ArrayList 中的 map 数据作为表单数据发布,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57304316/