spring-boot-openapi/README.md

28 lines
845 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# spring-boot-openapi
> SpringBoot下的OpenApi功能测试包含有Swagger和SpringDoc,对于SpringBoot下Swagger相关功能配置和授权相关授权如 apikey,basic,oauth2,jwt等
项目环境
- jdk1.8
- Maven 3.8.1
- spring-boot 2.7.16
- springdoc-openapi-ui 1.7.0
- springfox-boot-starter 3.0.0
## 1. 项目结构
```cmd
├─spring-boot-model # 项目测试实体
├─spring-boot-springdoc # SpringBoot集成SpringDoc
└─spring-boot-swagger # SpringBoot集成SpringFox(这里使用的是最后的版本Swagger3.0,其中SwaggerConfig配置的是SWAGGER_2SwaggerOpenApiConfig.java配置的是OAS_30)
```
## 2. 具体演示
- SpringFox Swagger
![img/Swagger.png](img/Swagger.png)
- Spring Doc
![img/img.png](img/img.png)
- oauth2
![img/oauth2.png](img/oauth2.png)