記一次踩坑經歷:
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"])]
原因:
JavaBean類Image中有一個屬性類型剛開始設置成int類型,生成getter/setter方法后,又將其改成了Integer類型,結果就出現了上述情況
