更新时间:2023-10-15 09:11:10
看来你可能已经注释了getPeople和setPeople方法。 JAXB(和其他Java EE技术)只需要您注释一个。
It appears that you may have annotated both the getPeople and setPeople methods. JAXB (and other Java EE technologies) only require you annotate one.
public class Community {
private List<Person> people;
@XmlElementRef
public List<Person> getPeople() {
return people;
}
public void setPeople(List<Person> people) {
this.people = people;
}
}
更多信息