本文主要是介绍Jaxb - com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 8 counts of IllegalAnnotationExcepti,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
一、异常
com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 8 counts of IllegalAnnotationExceptions
类的两个属性具有相同名称 "orderName"his problem is related to the following location:at public java.lang.String com.xl.mall.entity.Order.getOrderName()at com.xl.mall.entity.Orderthis problem is related to the following location:at private java.lang.String com.xl.mall.entity.Order.orderNameat com.xl.mall.entity.Order
二、方案
实体类中的属性和Getter方法冲突,在class上注解@XmlAccessorType(XmlAccessType.FIELD)即可
这篇关于Jaxb - com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 8 counts of IllegalAnnotationExcepti的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!