java - Spring STS : How to automatically create a webpage for all API methods, 就像 .Net 一样

标签 java spring spring-boot

在 .Net 中创建了一组 Web API,它附带了一个网页,其中仅列出了每个 API 方法,您可以选择要运行的方法。

什么是Spring STS?

Here's a picture of what I mean, .Net web api page

最佳答案

您可以为此使用 Swagger UI,使用 Spring 使用一些注释非常容易设置。

看看https://swagger.io/

这里还有一个使用 Spring 进行设置的指南:

http://www.baeldung.com/swagger-2-documentation-for-spring-rest-api

关于java - Spring STS : How to automatically create a webpage for all API methods, 就像 .Net 一样,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45593178/

相关文章:

java - 如何在struts2 junit4测试用例中发布请求中的json

java - 为什么添加 try block 会使程序更快?

java - 查找域的名称服务器

java - 如何将 Spring Config XML 迁移到 Spring Boot 注释

spring - 使用Spring-Reactor针对不同JVM进行异步事件驱动编程

java - JPA 规范对 CriteriaBuilder.or() 方法没有影响

java - Android 中的原生 AAC 流媒体

java - 使用 Spring Web Service 将 Hibernate 映射程序拆分为前端和后端

mysql - 如何显示实体和数据库表结构之间的差异

java - SpringBoot 2 与 Flyway : spring. Flyway.locations 被忽略