From a243944cbc6d9335200b516868f3ef3bcf53be8c Mon Sep 17 00:00:00 2001 From: BYEONGRYEOL Date: Wed, 7 Aug 2024 00:08:16 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20healthcheck=20api=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/gt/genti/health/HealthController.java | 17 +++++++++++++++++ .../gt/genti/constants/WhiteListConstants.java | 2 ++ 2 files changed, 19 insertions(+) create mode 100644 genti-api/src/main/java/com/gt/genti/health/HealthController.java diff --git a/genti-api/src/main/java/com/gt/genti/health/HealthController.java b/genti-api/src/main/java/com/gt/genti/health/HealthController.java new file mode 100644 index 00000000..9a915dba --- /dev/null +++ b/genti-api/src/main/java/com/gt/genti/health/HealthController.java @@ -0,0 +1,17 @@ +package com.gt.genti.health; + +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +import lombok.RequiredArgsConstructor; + +@RestController +@RequiredArgsConstructor +public class HealthController { + + @GetMapping("/health") + public ResponseEntity health() { + return ResponseEntity.ok().build(); + } +} diff --git a/genti-common/src/main/java/com/gt/genti/constants/WhiteListConstants.java b/genti-common/src/main/java/com/gt/genti/constants/WhiteListConstants.java index b4167f79..16613727 100644 --- a/genti-common/src/main/java/com/gt/genti/constants/WhiteListConstants.java +++ b/genti-common/src/main/java/com/gt/genti/constants/WhiteListConstants.java @@ -28,6 +28,7 @@ void postConstruct() { } private List filterWhiteList = new ArrayList<>(List.of( + "/health", "/favicon.ico", "/error", "/auth/**", @@ -43,6 +44,7 @@ void postConstruct() { )); private List securityWhiteList = new ArrayList<>(List.of( + "/health", "/favicon.ico", "/error", "/auth/**",