From 6e653e125876e1d41f1f66ee4506212c8d054a2d Mon Sep 17 00:00:00 2001 From: "michele.artini" Date: Wed, 23 Mar 2022 08:49:13 +0100 Subject: [PATCH] swagger home redirect --- .../src/main/java/eu/dnetlib/SwaggerController.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/apps/dnet-exporter-api/src/main/java/eu/dnetlib/SwaggerController.java b/apps/dnet-exporter-api/src/main/java/eu/dnetlib/SwaggerController.java index c3cadff1..b53bbbc4 100644 --- a/apps/dnet-exporter-api/src/main/java/eu/dnetlib/SwaggerController.java +++ b/apps/dnet-exporter-api/src/main/java/eu/dnetlib/SwaggerController.java @@ -1,7 +1,4 @@ package eu.dnetlib; -import java.io.IOException; - -import javax.servlet.http.HttpServletResponse; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -10,10 +7,10 @@ import org.springframework.web.bind.annotation.RequestMapping; public class SwaggerController { @RequestMapping(value = { - "/", "/docs" + "/", "/docs", "swagger-ui.html" }) - public void index(final HttpServletResponse response) throws IOException { - response.sendRedirect("swagger-ui.html"); + public String index() { + return "redirect:swagger-ui/"; } }