springboot 返回的json中忽略null属性值,不传递

第一种:

@JsonInclude(JsonInclude.Include.NON_NULL)

第二种:

spring:
  jackson:
    default-property-inclusion: non_null


作者:懒_小白
链接:https://www.jianshu.com/p/940407a012b4
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
原文地址:https://www.cnblogs.com/telwanggs/p/13525086.html