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