简体   繁体   English

从enunciate中排除一些jaxb生成的类

[英]exclude some jaxb generated classes from enunciate

I am using enunciate and want to exclude certain jaxb generated classes from the documentation. 我正在使用enunciate并希望从文档中排除某些jaxb生成的类。 How can this be done? 如何才能做到这一点?

Is it possible to add the org.codehaus.enunciate.XmlTransient annotation via the xsd? 是否可以通过xsd添加org.codehaus.enunciate.XmlTransient注释?

Thanks in advance. 提前致谢。

  <?xml version="1.0"?>
  <enunciate ...>

    <api-classes>
      <exclude pattern="com.mycompany.nonvisible.**"/>
    </api-classes>
    ...
  </enunciate>

Try excluding the class by annotating it with @com.webcohesion.enunciate.metadata.Ignore (see user guide ). 尝试使用@com.webcohesion.enunciate.metadata.Ignore注释来排除该类(请参阅用户指南 )。 This worked for me. 这对我有用。

I also had no success excluding JAXB classes by listing them in enunciate.xml. 通过在enunciate.xml中列出它们,我也没有成功排除JAXB类。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM