From 911040492ec3a1d0ffc3be3f4d755ce4c7bc008c Mon Sep 17 00:00:00 2001 From: zhangxingjia Date: Tue, 28 Feb 2023 19:02:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=8E=BB=E6=8E=89Swagger=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E9=85=8D=E7=BD=AE=E7=B1=BB=E4=B8=AD=E7=9A=84=E5=86=97?= =?UTF-8?q?=E4=BD=99=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../swagger/config/YudaoSwaggerAutoConfiguration.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java index 2481d2b74..32acb33cc 100644 --- a/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java +++ b/yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/swagger/config/YudaoSwaggerAutoConfiguration.java @@ -52,8 +52,7 @@ public class YudaoSwaggerAutoConfiguration { // 接口信息 .info(buildInfo(properties)) // 接口安全配置 - .components(new Components().securitySchemes(securitySchemas)) - .addSecurityItem(new SecurityRequirement().addList(HttpHeaders.AUTHORIZATION)); + .components(new Components().securitySchemes(securitySchemas)); securitySchemas.keySet().forEach(key -> openAPI.addSecurityItem(new SecurityRequirement().addList(key))); return openAPI; }