记一次踩坑经历:
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类型,结果就出现了上述情况


YOLO