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.
我已经找到了这个QA并且能够阻止生成类,但是仍然会生成枚举。
我试图通过自定义绑定来防止它:
<jxb:bindings node="//xs:simpleType[@name='myEnum']"> <jxb:class ref="com.myapp.enums.MyEnum" /> </jxb:bindings>
但这对我不起作用。是否有可能阻止枚举的生成或其他自定义?
您必须使用以下代码段
<jxb:bindings node="//xs:simpleType[@name='myEnum']"> <jxb:typesafeEnumClass ref="com.myapp.enums.MyEnum"/> </jxb:bindings>