Commit 9c6fa42e authored by Gyeongho Park's avatar Gyeongho Park

[MOD] Swagger URI 리다이렉

parent 38b3a342
...@@ -2,6 +2,14 @@ package com.vazil.vridge.docs; ...@@ -2,6 +2,14 @@ package com.vazil.vridge.docs;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.servlet.function.RouterFunction;
import org.springframework.web.servlet.function.ServerResponse;
import java.net.URI;
import static org.springframework.web.servlet.function.RequestPredicates.GET;
import static org.springframework.web.servlet.function.RouterFunctions.route;
@SpringBootApplication @SpringBootApplication
public class VridgeDocsApplication { public class VridgeDocsApplication {
...@@ -10,4 +18,9 @@ public class VridgeDocsApplication { ...@@ -10,4 +18,9 @@ public class VridgeDocsApplication {
SpringApplication.run(VridgeDocsApplication.class, args); SpringApplication.run(VridgeDocsApplication.class, args);
} }
@Bean
RouterFunction<ServerResponse> routerFunction() {
return route(GET("/api/swagger"), req -> ServerResponse.temporaryRedirect(URI.create("/swagger-ui/index.html")).build());
}
} }
...@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.*; ...@@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.*;
@AllArgsConstructor @AllArgsConstructor
@Log4j2 @Log4j2
@RequestMapping("/api") @RequestMapping("/api")
@CrossOrigin
@Api("가이드 API V1") @Api("가이드 API V1")
public class GuideController { public class GuideController {
GuideService guideService; GuideService guideService;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment