简体   繁体   English

如何为 Spring REST 服务生成 WADL

[英]How to generate WADL for Spring REST Service

Hi I am working with Spring 3.5.0.Release.嗨,我正在使用 Spring 3.5.0.Release。 I want to generate a WADL for my spring rest service.我想为我的春季休息服务生成一个 WADL。 Is their any functionality in Spring by which i can easily generate the WADL.他们在 Spring 中是否有任何功能,我可以通过它轻松生成 WADL。

Spring REST does not come with out of the box WADL generator like JERSEY However it should be pretty easy to get it done. Spring REST没有像JERSEY一样开箱即用的WADL生成器。但是它应该很容易完成。

https://jira.spring.io/browse/SPR-8705 https://jira.spring.io/browse/SPR-8705

See Blogpost https://javattitude.wordpress.com/2014/05/26/wadl-generator-for-spring-rest/ 请参阅Blogpost https://javattitude.wordpress.com/2014/05/26/wadl-generator-for-spring-rest/

You can use Swagger-SpringMVC, which will automatically integrate Swagger compliant API-docs into your application. 您可以使用Swagger-SpringMVC,它会自动将符合Swagger的API文档集成到您的应用程序中。

Version 1.0.2 is stable and supports Swagger 1.2. 版本1.0.2稳定并支持Swagger 1.2。

Version 2.0.0 is currently under development and will support Swagger 2.0. 2.0.0版目前正在开发中,并将支持Swagger 2.0。

The api-docs will be accessible using http://localhost:8080/api-docs then. 然后可以使用http:// localhost:8080 / api-docs访问api-docs

https://github.com/springfox/springfox https://github.com/springfox/springfox

You can also use Swagger-UI to access the API-docs and you can generate the client code using Swagger-Codegen. 您还可以使用Swagger-UI访问API文档,并且可以使用Swagger-Codegen生成客户端代码。

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

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