From a4a6f38741cb84ffce45afb093577fd8793e7df8 Mon Sep 17 00:00:00 2001 From: Peter Siegmund Date: Sat, 17 Aug 2024 20:24:12 +0200 Subject: [PATCH] redirect on root call Signed-off-by: Peter Siegmund --- .../root/controller/web/RootController.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/main/java/dev/mars3142/fhq/timezone_service/root/controller/web/RootController.java diff --git a/src/main/java/dev/mars3142/fhq/timezone_service/root/controller/web/RootController.java b/src/main/java/dev/mars3142/fhq/timezone_service/root/controller/web/RootController.java new file mode 100644 index 0000000..8d40e11 --- /dev/null +++ b/src/main/java/dev/mars3142/fhq/timezone_service/root/controller/web/RootController.java @@ -0,0 +1,21 @@ +package dev.mars3142.fhq.timezone_service.root.controller.web; + +import java.net.URI; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/") +public class RootController { + + @GetMapping + public ResponseEntity getRoot() { + return ResponseEntity.status(HttpStatus.SEE_OTHER) + .location(URI.create("https://firmware-hq.dev")) + .build(); + } + +}