Skip to content

Commit

Permalink
Feat: Swagger 설정 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
yslle committed Jul 4, 2024
1 parent 7bbe7ff commit 84bb3a8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/com/umc/dream/config/SwaggerConfig.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.umc.dream.config;

import io.swagger.v3.oas.annotations.servers.Server;
import io.swagger.v3.oas.models.Components;
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;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
Expand All @@ -29,6 +29,8 @@ public OpenAPI openAPI() {

// Swagger UI 접속 후, 딱 한 번만 accessToken을 입력해주면 모든 API에 토큰 인증 작업이 적용됩니다.
return new OpenAPI()
.servers(Arrays.asList(
new Server().url("https://dev.seungyeon.shop").description("Develop server"), new Server().url("http://localhost:8080").description("Local server")))
.addSecurityItem(securityRequirement)
.components(components);
}
Expand Down

0 comments on commit 84bb3a8

Please sign in to comment.