杰克逊@JsonIgnoreProperties不忽略possibleTargets,但忽略所有者和lemf。如何我可以忽略列表。杰克逊图书馆忽略属性
@JsonIgnoreProperties({"owner","lemf"," possibleTargets"})
@Entity
public class Warrant extends Nameable {
@LazyCollection(LazyCollectionOption.FALSE)
@OneToMany(mappedBy ="warrant",targetEntity = com.endersys.lims.model.Target.class)
private List<Target> possibleTargets;
输出:
[{"status":"SCHEDULED","startDate":1320962400000,"endDate":1320962400000,"caseId":"1","possibleTargets":[],"name":"warrant_1","description":"decription","identity":"warrant_1","version":1,"systemId":1,"active":true}]
“possibleTargets”开始有空格 – 2013-10-17 17:17:18