From ed63cac96f98f451ef1c8e8a89a84c23993bdc82 Mon Sep 17 00:00:00 2001 From: Raja Kolli Date: Mon, 25 Sep 2023 14:44:26 +0000 Subject: [PATCH] feat: fixes sonar Security Hotspot issue --- .../java/org/example/openapi/controller/HomeController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/open-api-spring-boot/src/main/java/org/example/openapi/controller/HomeController.java b/open-api-spring-boot/src/main/java/org/example/openapi/controller/HomeController.java index 1547e26be..5a64e835a 100644 --- a/open-api-spring-boot/src/main/java/org/example/openapi/controller/HomeController.java +++ b/open-api-spring-boot/src/main/java/org/example/openapi/controller/HomeController.java @@ -2,6 +2,7 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; /** * Home redirection to OpenAPI api documentation @@ -9,7 +10,7 @@ @Controller public class HomeController { - @RequestMapping("/") + @RequestMapping(value = "/", method = RequestMethod.GET) public String index() { return "redirect:swagger-ui.html"; }