springboot下的openapi功能测试,包含有Swagger和springdoc
Go to file
a3fcc1b0f9 配置接口注解和文档说明 2024-03-08 16:49:43 +08:00
img 配置接口注解和文档说明 2023-10-19 10:24:36 +08:00
spring-boot-model init 2023-10-13 17:41:41 +08:00
spring-boot-springdoc 配置接口注解和文档说明 2024-03-08 16:49:43 +08:00
spring-boot-swagger 配置接口注解和文档说明 2024-03-08 16:49:43 +08:00
.gitignore Merge branch 'master' of https://gitea.jnssd.com/kingzton/spring-boot-openapi 2023-10-13 17:44:09 +08:00
README.md 配置接口注解和文档说明 2023-10-19 10:24:36 +08:00
img.png 配置接口注解和文档说明 2023-10-19 10:24:36 +08:00
pom.xml 配置接口注解和文档说明 2023-10-19 10:24:36 +08:00

README.md

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. 项目结构

├─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
  • Spring Doc img/img.png
  • oauth2 img/oauth2.png