第一种:
@JsonInclude(JsonInclude.Include.NON_NULL)
第二种:
spring:
jackson:
default-property-inclusion: non_null
@JsonInclude(JsonInclude.Include.NON_NULL)
spring:
jackson:
default-property-inclusion: non_null
本文标题:springboot 返回的json中忽略null属性值,不传递
本文链接:https://www.haomeiwen.com/subject/vmknpqtx.html
网友评论