HttpMessageNotReadableException(一)


1、今天移動端調用接口時候出現下面異常

org.springframework.http.converter.HttpMessageNotReadableException:

JSON parse error: Unrecognized token 'name': was expecting ('true', 'false' or 'null');

nested exception is com.fasterxml.jackson.core.JsonParseException:

Unrecognized token 'name': was expecting ('true', 'false' or 'null')

2、原因:

接口中要求json形式,name是String類型

前端傳值為的是表單類型,出現了上面的錯誤


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM