jaxb.properties missing at runtime when built with Maven

后端 未结 3 1087
渐次进展
渐次进展 2021-01-11 18:47

I have a project where I want to work with a set of Classes generated by JAXB from an XSD. With these classes I would like to marshall/unmarshall from XML and JSON.

<
3条回答
  •  失恋的感觉
    2021-01-11 19:22

    Use it as a System property, if it is cumbersome to add jaxb.properties files for each and every java packages where JAXB pojo classes are present.

    System.setProperty("javax.xml.bind.JAXBContextFactory", "org.eclipse.persistence.jaxb.JAXBContextFactory");
    

提交回复
热议问题