Skip to content

Commit

Permalink
HOTFIX: 스웨거 서버 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
hyxklee committed Oct 8, 2024
1 parent c973665 commit 5f3d9f9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/com/leets/X/global/config/SwaggerConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.security.SecurityRequirement;
import io.swagger.v3.oas.models.security.SecurityScheme;
import io.swagger.v3.oas.models.servers.Server;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

Expand All @@ -26,6 +27,7 @@ public OpenAPI openAPI() {
SecurityRequirement securityRequirement = getSecurityRequireMent();

return new OpenAPI()
.addServersItem(new Server().url("/"))
.components(new Components().addSecuritySchemes("jwt token", securityScheme))
.security(List.of(securityRequirement));
}
Expand Down

0 comments on commit 5f3d9f9

Please sign in to comment.