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; }