Commit 911040492ec3a1d0ffc3be3f4d755ce4c7bc008c
1 parent
d9121ca8
fix: 去掉Swagger自动配置类中的冗余配置
Showing
1 changed file
with
1 additions
and
2 deletions
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 { | @@ -52,8 +52,7 @@ public class YudaoSwaggerAutoConfiguration { | ||
| 52 | // 接口信息 | 52 | // 接口信息 |
| 53 | .info(buildInfo(properties)) | 53 | .info(buildInfo(properties)) |
| 54 | // 接口安全配置 | 54 | // 接口安全配置 |
| 55 | - .components(new Components().securitySchemes(securitySchemas)) | ||
| 56 | - .addSecurityItem(new SecurityRequirement().addList(HttpHeaders.AUTHORIZATION)); | 55 | + .components(new Components().securitySchemes(securitySchemas)); |
| 57 | securitySchemas.keySet().forEach(key -> openAPI.addSecurityItem(new SecurityRequirement().addList(key))); | 56 | securitySchemas.keySet().forEach(key -> openAPI.addSecurityItem(new SecurityRequirement().addList(key))); |
| 58 | return openAPI; | 57 | return openAPI; |
| 59 | } | 58 | } |