我想为我的项目生成一个 wadl 文件,该文件使用resteasy + Jboss 6.4 + Maven。
有很多关于球衣的例子,但不是关于resteasy的,有人用它来resteasy吗
Resteasy 从 3.0.14.Final 开始支持 WADL 生成。您需要将resteasy-wadl添加到您的依赖管理器(例如maven):
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-wadl</artifactId>
<version>3.0.19.Final</version>
</dependency>
然后在 web.xml 中声明一个新的 servlet 端点以提供生成的 wadl 文件:
<servlet>
<servlet-name>WADL</servlet-name>
<servlet-class>org.jboss.resteasy.wadl.ResteasyWadlServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>WADL</servlet-name>
<url-pattern>/application.wadl</url-pattern>
</servlet-mapping>
源代码:
https://github.com/resteasy/Resteasy/tree/master/resteasy-wadl https://github.com/resteasy/Resteasy/tree/master/resteasy-wadl
实施票:
https://issues.jboss.org/browse/RESTEASY-166 https://issues.jboss.org/browse/RESTEASY-166
Resteasy 的示例:
https://github.com/resteasy/resteasy-examples/tree/master/wadl-example/src/main/java/org/jboss/resteasy/wadl/testing https://github.com/resteasy/resteasy-examples/tree/master/wadl-example/src/main/java/org/jboss/resteasy/wadl/testing
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)