redirect on root call

Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
2024-08-17 20:24:12 +02:00
parent 44a19d411f
commit a4a6f38741

View File

@@ -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<Void> getRoot() {
return ResponseEntity.status(HttpStatus.SEE_OTHER)
.location(URI.create("https://firmware-hq.dev"))
.build();
}
}