版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u012326462/article/details/83004970
@JsonIgnoreProperties 可以设置一批忽略序列化或者反序列化的属性。
@JsonIgnoreProperties(value = {"address"})
public class Person {
private String id;
private String name;
private Date birthday;
private String address;
...
这样 value中设置的类的属性,就不会被序列化或者反序列化。