JAXB and constructors

前端 未结 4 549
温柔的废话
温柔的废话 2020-12-04 12:28

I\'m starting learning JAXB, so my question can be very silly. Now I have classes and want generate XML Schema. Going after this instruction I get exception

4条回答
  •  无人及你
    2020-12-04 12:59

    You should have a default constructor for JAXB to be able to instantiate your classes. Maybe there is a workaround I don't know though.

    JAXB is especially fitted for bean-like classes, permitting to configure objects by calling setters on them.

提交回复
热议问题