VM JAXB属性“dateOfHire”的类型为“org.joda.time.LocalDate”,但未使用@XmlJavaTypeAdapter进行批注

时间:2017-10-18 09:03:41

标签: isis

在JAXB上我有一个LocalDate属性

@Property(editing = Editing.ENABLED)
@Getter @Setter
private LocalDate dateOfHire;

在我的其他实体上,我添加了@XmlJavaTypeAdapter(PersistentEntityAdapter.class)它们工作正常,但LocalDateorg.joda.time.LocalDate,因此我无法在其中添加注释。当我运行我的VM抛出异常时:

JAXB view model 'domainapp.modules.employment.dom.employee.EmployeeVM' property 'dateOfHire' is of type 'org.joda.time.LocalDate' but is not annotated with @XmlJavaTypeAdapter. The field/method must be annotated with @XmlJavaTypeAdapter(org.apache.isis.schema.utils.jaxbadapters.XxxAdapter.ForJaxb.class) or equivalent.

请帮助!!!

1 个答案:

答案 0 :(得分:1)

根据our docs

注释该字段