【发布时间】:2013-07-03 21:59:59
【问题描述】:
我正在尝试使用 spring(@Autowire 注释到 Jaxb 模型类中)
.....
@XmlAttribute(name = "object-id")
@XmlSchemaType(name = "positiveInteger")
protected BigInteger objectId;
@XmlTransient
@Autowired MediationCacheManager cacheManager;
MediationCacheManager 是从三个接口扩展而来的
在创建 JaxbContext 时,我捕获了一个异常:
Exception [EclipseLink-50089] (Eclipse Persistence Services - 2.5.0.v20121116-8650760): org.eclipse.persistence.exceptions.JAXBException
Exception Description: The java interface com.netcracker.mediation.common.caches.api.MediationCacheManager can not be mapped by JAXB as it has multiple mappable parent interfaces. Multiple inheritence is not supported
当然我知道 eclipselink 不支持多重继承,但我如何从 Jaxb 处理中跳过 cacheManager 字段?至于我 - 它应该通过 XmlTransient 注释来完成,但它不起作用。你有什么想法吗?
【问题讨论】:
标签: spring jaxb eclipselink moxy