错误信息:Could not write JSON: (was java.lang.NullPointerException); nested exception is com.faster

出现这个错误,是因为在转json的时候有对象的属性为null,搞了半天,最后在类的上面加上一个注解

//主要就是个注解,最后错误消失,程序正常运行
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ArcType implements Serializable {
}```

发布了9 篇原创文章 · 获赞 4 · 访问量 446

猜你喜欢

转载自blog.csdn.net/qq_35818188/article/details/104226135