Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想为具有 @XMLSchemaType(name="date") 的属性创建客户 JAXB 适配器
我怎样才能做到这一点?
谢谢, 哈里什
您可以使用XmlAdapter. 如果你XmlAdapter是这样的:XmlAdapter<Date, MyDateType>那么实际的 XML 元素的类型应该是“xs:date”,而你的 Java 对象的类型应该是 MyDateType。
XmlAdapter
XmlAdapter<Date, MyDateType>