File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
src/main/java/com/example/ForDay/global/config/swagger Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 55import io .swagger .v3 .oas .models .Components ;
66import io .swagger .v3 .oas .models .security .SecurityScheme ;
77import io .swagger .v3 .oas .models .security .SecurityRequirement ;
8+ import io .swagger .v3 .oas .models .servers .Server ;
89import org .springframework .context .annotation .Bean ;
910import org .springframework .context .annotation .Configuration ;
1011
12+ import java .util .List ;
13+
1114@ Configuration
1215public class SwaggerConfig {
1316
@@ -23,10 +26,19 @@ public OpenAPI openAPI() {
2326 SecurityRequirement securityRequirement = new SecurityRequirement ()
2427 .addList ("BearerAuth" );
2528
29+ Server productionServer = new Server ()
30+ .url ("https://forday.kr" )
31+ .description ("운영 서버" );
32+
33+ Server localServer = new Server ()
34+ .url ("http://localhost:8080" )
35+ .description ("로컬 테스트" );
36+
2637 return new OpenAPI ()
2738 .components (new Components ()
2839 .addSecuritySchemes ("BearerAuth" , securityScheme ))
2940 .addSecurityItem (securityRequirement )
41+ .servers (List .of (productionServer , localServer ))
3042 .info (new Info ()
3143 .title ("ForDay API" )
3244 .description ("ForDay API 명세서입니다." )
You can’t perform that action at this time.
0 commit comments