为了使响应与
AccountOrderList类匹配,json必须像这样
{ "accountOrders": [ { "symbol": "XRPETH", "orderId": 12122, "clientOrderId": "xxx", "price": "0.00000000", "origQty": "25.00000000", "executedQty": "25.00000000", "status": "FILLED", "timeInForce": "GTC", "type": "MARKET", "side": "BUY", "stopPrice": "0.00000000", "icebergQty": "0.00000000", "time": 1514558190255, "isWorking": true }, { "symbol": "XRPETH", "orderId": 1212, "clientOrderId": "xxx", "price": "0.00280000", "origQty": "24.00000000", "executedQty": "24.00000000", "status": "FILLED", "timeInForce": "GTC", "type": "LIMIT", "side": "SELL", "stopPrice": "0.00000000", "icebergQty": "0.00000000", "time": 1514640491287, "isWorking": true }, ....]}这就是错误消息说“ START_ARRAY令牌不足 ”的意思
如果您无法更改响应,请更改代码以接受Array,如下所示
this.webClient.get().uri(payload).accept(MediaType.APPLICATION_JSON) .retrieve().bodyToMono(AccountOrder[].class).log();
您可以将此数组转换为List,然后返回。



