data:{ produceBzLzkAdd: this.data.allList } 报错 Cannot deserialize instance of `java.util.ArrayList` out of START_OBJECT token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.util.ArrayList` out of START_OBJECT token↵ at [Source: (PushbackInputStream); line: 1, column: 1]"
把数组 JSON.stringify一下,java 用 @RequestBody String list 接收,然后用fastjson解析
header: { 'Content-type': 'application/json' } wx.request添加上面的header,参数一项直接填你的对象数组就OK了java的话用List<Object>接收吧,Object根据定义的对象来就可以了wx.request({method: 'POST',url: 'http:xxxx.xxx',data: [{a: '1',b: '2'},{a: '1',b: '2'}],header: {'Content-type': 'application/json'},success(res) {//},fail(err) {//}});直接在wx.request的data里写上就行了吧?
produceBzLzkAdd: this.data.allList
}
报错
Cannot deserialize instance of `java.util.ArrayList` out of START_OBJECT token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.util.ArrayList` out of START_OBJECT token↵ at [Source: (PushbackInputStream); line: 1, column: 1]"