springboot 忽略null属性值,不传递

第一种:

@JsonInclude(JsonInclude.Include.NON_NULL)

第二种:

spring:
  jackson:
    default-property-inclusion: non_null

  

猜你喜欢

转载自www.cnblogs.com/412013cl/p/10469975.html
今日推荐