File tree Expand file tree Collapse file tree
src/main/java/com/api/advanced_mobile/global/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package com .api .advanced_mobile .global .config ;
22
3+ import io .swagger .v3 .oas .annotations .OpenAPIDefinition ;
4+ import io .swagger .v3 .oas .annotations .servers .Server ;
35import io .swagger .v3 .oas .models .Components ;
46import io .swagger .v3 .oas .models .OpenAPI ;
57import io .swagger .v3 .oas .models .info .Info ;
6- import io .swagger .v3 .oas .models .servers .Server ;
78import org .springframework .beans .factory .annotation .Value ;
89import org .springframework .context .annotation .Bean ;
910import org .springframework .context .annotation .Configuration ;
1011
1112import java .util .List ;
1213
14+ @ OpenAPIDefinition (
15+ servers = {
16+ @ Server (url = "https://api.13.209.194.63.nip.io" , description = "https 서버입니다." ),
17+ @ Server (url = "http://api.13.209.194.63.nip.io" , description = "http 서버입니다." ),
18+ @ Server (url = "http://localhost:8080" , description = "local 서버입니다." )
19+ }
20+ )
1321@ Configuration
1422public class SwaggerConfig {
1523
@@ -20,13 +28,8 @@ public OpenAPI openAPI() {
2028 .version ("v0.0.1" )
2129 .description ("API 명세서입니다." );
2230
23- Server httpsServer = new Server ();
24- httpsServer .setUrl ("https://api.13.209.194.63.nip.io" );
25- httpsServer .setDescription ("HTTPS Server" );
26-
2731 return new OpenAPI ()
2832 .info (info )
29- .servers (List .of (httpsServer )) // HTTPS만 명시
3033 .components (new Components ());
3134 }
3235}
You can’t perform that action at this time.
0 commit comments