Aşağıdaki JAXB/Java koduna sahibiz. Bu, List<JQGridTO> rows
'u List<? extends JQGridTO> rows
olarak değiştirene kadar iyi çalıştı.JAXB ve jenerik içeren koleksiyonlar
Constructor threw exception; nested exception is com.sun. xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions Property rows appears in @XmlType.propOrder, but no such property exists. Maybe you meant records? this problem is related to the following location: at com.me.ui.service.JQGridJsonRoot
Neden bu hatayı alıyorum:
biz bu değişikliği yapan
bu hatayı alıyorum? Generics'i yaptığımız gibi kullanamaz mısınız (yani:? extends XXX
belirtiliyor)?
@XmlRootElement
@XmlType(name = "", propOrder = {
"records",
"page",
"total",
"rows"
})
public class JQGridJsonRoot {
int total; //total pages for the query
int page; //current page of the query
int records; //total number of records for the query
List<? extends JQGridTO> rows
...