JAXB Bean Generation

前端 未结 1 633
旧巷少年郎
旧巷少年郎 2021-01-12 11:03

I am using JAXB for generating beans from XSD\'s using a JAXB plugin in Maven. This is working fine, expect that the code contains isSetXXXXXX() methods for each field.

相关标签:
1条回答
  • 2021-01-12 11:23

    By default a JAXB (JSR-222) implementation will not generate isSet methods. Since you are getting them one of the following must be true:

    1. You can a schema annotation that specifies: <jaxb:globalBindings generateIsSetMethod="true"/>
    2. You have an external binding file that specifies: <jaxb:globalBindings generateIsSetMethod="true"/>
    3. You are specifying a property to the Maven plug-in to generate the isSet methods.
    0 讨论(0)
提交回复
热议问题