Java继承 打印子类时显示父类属性

@ToString(callSuper = true)

java去掉返回对象中为NULL的属性~~~~

 <dependency>
     <groupId>com.fasterxml.jackson.core</groupId>
     <artifactId>jackson-core</artifactId>
     <version>2.7.3</version>
  </dependency>
   
  <dependency>
       <groupId>com.fasterxml.jackson.core</groupId>
       <artifactId>jackson-databind</artifactId>
       <version>2.7.3</version>
  </dependency>
  
  <dependency>
     <groupId>com.fasterxml.jackson.core</groupId>
     <artifactId>jackson-annotations</artifactId>
     <version>2.7.3</version>
  </dependency>~~~~

属性加注解

  @JsonInclude(JsonInclude.Include.NON_NULL)
  private String upSystemId;

来自
Java继承 打印子类时显示父类属性
java去掉返回对象中为NULL的属性


拾柒_
87 声望1 粉丝