Spring Boot —— 集成 Springdoc

pom

<dependency>
   <groupId>org.springdoc</groupId>
   <artifactId>springdoc-openapi-ui</artifactId>
   <version>x.x.x</version>
</dependency>

<!-- Spring boot 3 使用 -->
<!-- https://mvnrepository.com/artifact/org.springdoc/springdoc-openapi-ui -->
<dependency>
   <groupId>org.springdoc</groupId>
   <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
   <version>2.1.0</version>
</dependency>

使用

访问 http://domain.com/swagger-ui.html

posted @ 2024-05-20 14:52  试试手气  阅读(69)  评论(0编辑  收藏  举报