📅  最后修改于: 2023-12-03 15:05:16.774000             🧑  作者: Mango
springdoc-openapi-ui is a tool that generates OpenAPI (formerly known as Swagger) documentation for your Spring Boot applications. It is built on top of the Spring WebFlux framework and supports both Java and Kotlin.
Some of the key features of springdoc-openapi-ui include:
To start using springdoc-openapi-ui, you need to add the following Maven dependency to your project:
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>{latest.version}</version>
</dependency>
You can also use Gradle to add the dependency:
implementation 'org.springdoc:springdoc-openapi-ui:{latest.version}'
Once you have added the dependency, you can start annotating your Spring controllers and models with OpenAPI annotations to customize the documentation. You can also configure the tool with various options to control the behavior of the tool.
To access the documentation, simply navigate to the following URL:
http://localhost:8080/swagger-ui.html
This will display the Swagger UI interface where you can explore the API and test the endpoints.
Overall, springdoc-openapi-ui is a great tool for generating API documentation for your Spring Boot applications. It is easy to use, highly customizable, and provides an interactive interface for exploring the API. If you are working on a Spring Boot project, you should definitely give it a try!