1、FastJson转Json字符串时,忽略指定属性
1.1使用注解@JSONField
import java.io.Serializable;
public class FastJsonInputBean implements Serializable {
@JSONField(serialize = false)
private String contractImage;
}
2、文静的小丸子忽略字段
private String contractImage;
}
2、文静的小丸子忽略字段
@JsonIgnoreProperties主键或者在字段上使用@JsonIgnore
@JsonIgnoreProperties({"contractTemplateId", "contractImage"})
public class 文静的小丸子InputBean implements Serializable {
@JsonIgnore
private String contractId;
}