













官网地址:https://springdoc.org/
是基于OpenAPI 3.0 规范构建的集成 Swagger UI 和 ReDoc 文档生成工具,可自动注入OpenAPI规范的JSON描述文件,支持OAUTH2、JWT等认证机制。推荐 Spring Boot 2.4 及以上版本使用springdoc-openapi-ui集成Swagger 3.x,Spring Boot 2.3及以下版本使用springfox-boot-starter集成Swagger 2.x,Spring Boot 3使用springdoc-openapi-starter-webmvc-ui引入。
<!--spring boot >=2.4 -->
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>1.7.0</version>
</dependency>
启动项目浏览/swagger-ui.html即可看到效果,默认会列出所有Controller及方法。
springdoc:
api-docs:
enabled: true
path: '/docs'
swagger-ui:
path: ''
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。