是否有类似 javadoc 的工具可以从 JAX-RS 注释生成 RESTful Web 服务 apidoc?

发布于 2024-10-16 23:44:10 字数 1539 浏览 6 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

倾`听者〃 2024-10-23 23:44:10

看看阐明。有一个 Maven 插件,它将生成站点中包含的文档。

Take a look at Enunciate. There's a Maven plugin that will generate docs included in the site.

留蓝 2024-10-23 23:44:10

如果您正在构建 Restful Web 服务,则该文档称为 WADL。 WADL 基本上是 WSDL 的 Rest 版本。我使用 Jersey 构建我的 Restful Web 服务。 Jersey 根据您资源包中的注释自动创建 WADL。以下是 Jersey 网站上的 WADL 示例:
https://java.net/projects/jersey /sources/svn/show/trunk/jersey/samples/generate-wadl

最好的部分是你什么都不做。 :) 当您更改 Resource 类中的 URI 或参数注释时,它们将自动反映在本文档中。

塔达! :)

If you are building Restful webservices, the documentation is known as WADL. WADL is basically Rest's version of WSDL. I use Jersey to build my Restful web services. Jersey automatically creates the WADL based on the annotations you have in your resources package. Here's how the sample WADL looks like from Jersey's website:
https://java.net/projects/jersey/sources/svn/show/trunk/jersey/samples/generate-wadl

The best part of this is you do absolutely nothing. :) When you change the URI or parameters annotation in your Resource classes, they will be automatically reflected in this documentation.

TADAA! :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文