org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON

記一次踩坑經歷:
Resolved [org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: (was java.lang.NullPointerException); nested exception is com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: com.renqijie.pojo.vo.IndexBean["images"]->java.util.ArrayList[0]->com.renqijie.pojo.Image["id"])]java

緣由:
JavaBean類Image中有一個屬性類型剛開始設置成int類型,生成getter/setter方法後,又將其改爲了Integer類型,結果就出現了上述狀況web

相關文章
相關標籤/搜索