springboot中使用@RequestBody獲取傳參實體時,如果傳參json的屬性在接收實體中不存在會報錯如下
org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Unrecognized field \"dishName2\"
通過在實體類上增加註解
@JsonIgnoreProperties(ignoreUnknown = true)
可以解決問題。
springboot中使用@RequestBody獲取傳參實體時,如果傳參json的屬性在接收實體中不存在會報錯如下
org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Unrecognized field \"dishName2\"
通過在實體類上增加註解
@JsonIgnoreProperties(ignoreUnknown = true)
可以解決問題。
異常現象: 異常原因: 數據源獲取異常 解決方法: git config --global url."https://".insteadOf git:// npm install
system.runtime.interopservices.SEHexception :external component has thrown