!424 fix: 去掉Swagger自动配置类中的冗余配置

Merge pull request !424 from zhangxingjia/master
This commit is contained in:
芋道源码 2023-02-28 16:49:02 +00:00 committed by Gitee
commit 94c831d519
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -52,8 +52,7 @@ public class YudaoSwaggerAutoConfiguration {
// 接口信息 // 接口信息
.info(buildInfo(properties)) .info(buildInfo(properties))
// 接口安全配置 // 接口安全配置
.components(new Components().securitySchemes(securitySchemas)) .components(new Components().securitySchemes(securitySchemas));
.addSecurityItem(new SecurityRequirement().addList(HttpHeaders.AUTHORIZATION));
securitySchemas.keySet().forEach(key -> openAPI.addSecurityItem(new SecurityRequirement().addList(key))); securitySchemas.keySet().forEach(key -> openAPI.addSecurityItem(new SecurityRequirement().addList(key)));
return openAPI; return openAPI;
} }