当我发送 json 数组时,Spring 会抛出错误。我不确定我在这里缺少什么。
请求体
{
"deliverySessionId":"c1fb327b-98a8-46d4-9e82-ce7507b5be93",
imageNames: ["name1", "name2"]
}
端点
@RequestMapping(value = { "/examImages/" }, method = { RequestMethod.POST } )
public @ResponseBody ImageResponseCommand streamExamImages( @RequestBody ImageResponseCommand imageResponseCommand ) {
错误
The request sent by the client was syntactically incorrect.
如果我的请求不包含 imageNames 属性,它可以正常工作。
{ "deliverySessionId":"c1fb327b-98a8-46d4-9e82-ce7507b5be93" }