Spring Boot 中使用 Swagger 的 Maven 依赖项
在您的 pom.xml 文件中添加以下 Maven 依赖项,以引入 Swagger:
<dependencies>
<!-- Swagger -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.9.2</version>
</dependency>
</dependencies>
这些依赖项将帮助您在 Spring Boot 项目中集成 Swagger,并提供 Swagger UI 来查看和测试 API 文档。确保将版本号设置为最新的稳定版本。
原文地址: https://www.cveoy.top/t/topic/bWfR 著作权归作者所有。请勿转载和采集!