From 84bb3a8491a42e804b5d9187cc1dc2076615ffbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EC=8A=B9=EC=97=B0?= Date: Thu, 4 Jul 2024 20:59:47 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20Swagger=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/umc/dream/config/SwaggerConfig.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/umc/dream/config/SwaggerConfig.java b/src/main/java/com/umc/dream/config/SwaggerConfig.java index bdb965c..2d026c7 100644 --- a/src/main/java/com/umc/dream/config/SwaggerConfig.java +++ b/src/main/java/com/umc/dream/config/SwaggerConfig.java @@ -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; @@ -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); }