swagger home redirect

This commit is contained in:
Michele Artini 2022-03-23 08:49:13 +01:00
parent 1311afa993
commit 6e653e1258
1 changed files with 3 additions and 6 deletions

View File

@ -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/";
}
}