1. 程式人生 > >org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deseri

org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deseri

 org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deserialize instance of `sds.db.dao.User` out of START_ARRAY token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `sds.db.dao.User` out of START_ARRAY token
 at [Source: (PushbackInputStream); line: 1, column: 1]

錯誤原因 是因為請求的引數json格式不對 檢查一下 引數是不是陣列,傳輸的值是不是陣列。前端傳輸的資料格式要與spring的引數格式一致才可以 否則報錯。