spring boot Jackson忽略字段不序列化字段

使用JsonIgnoreProperties注解忽略多个字段

@JsonIgnoreProperties({ "summary", "author" })
public class ArticleIgnoreProperties {
 
	private String title;
	private String summary;
	private String content;
	private String author;
 
	// 省略getter、setter方法
 
	@Override
	public String toString() {
		return "ArticleIgnoreProperties [title=" + title + ", summary=" + summary + ", content=" + content + ", author="
		        + author + "]";
	}
 
}
原文地址:https://www.cnblogs.com/mingyue5826/p/14345252.html