記一次踩坑經歷:
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