【发布时间】:2011-01-18 17:00:48
【问题描述】:
我在package-info.java 中将@XmlAccessorType(XmlAccessType.NONE) 用于my.package,这意味着JAXB 应该只关心带注释的元素。但是,当我使用 un/marshalling 代码为简单的 POJO MOXy 运行 JUnit 测试时,MOXy 只会以这种方式尖叫每个类(即使来自没有 jaxb.properties 的包或依赖项中引用的其他 maven 模块):
Exception Description: The class other.maven.module.package.class requires a zero argument constructor or a specified factory method. Note that non-static inner classes do not have zero argument constructors and are not supported.
我还没有遇到过 Metro 的此类问题(参考实现,但我使用它还有其他缺陷),不幸的是我真的不能以这种方式修改每个类。
【问题讨论】:
标签: jaxb eclipselink moxy