From d0cf131417dda0e9f0037a0ca0c1a0da2c5c5a1a Mon Sep 17 00:00:00 2001 From: Haebin Date: Mon, 18 Mar 2024 21:48:21 +0900 Subject: [PATCH] fix: Health Check --- .../security/matcher/CustomRequestMatcher.kt | 1 + .../vacgom/backend/global/view/HomeController.kt | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 src/main/kotlin/com/vacgom/backend/global/view/HomeController.kt diff --git a/src/main/kotlin/com/vacgom/backend/global/security/matcher/CustomRequestMatcher.kt b/src/main/kotlin/com/vacgom/backend/global/security/matcher/CustomRequestMatcher.kt index 664c0d6..6a944f6 100644 --- a/src/main/kotlin/com/vacgom/backend/global/security/matcher/CustomRequestMatcher.kt +++ b/src/main/kotlin/com/vacgom/backend/global/security/matcher/CustomRequestMatcher.kt @@ -10,6 +10,7 @@ class CustomRequestMatcher { fun authEndpoints(): RequestMatcher { return OrRequestMatcher( + AntPathRequestMatcher("/"), AntPathRequestMatcher("/api/v1/oauth/**") ) } diff --git a/src/main/kotlin/com/vacgom/backend/global/view/HomeController.kt b/src/main/kotlin/com/vacgom/backend/global/view/HomeController.kt new file mode 100644 index 0000000..5f44314 --- /dev/null +++ b/src/main/kotlin/com/vacgom/backend/global/view/HomeController.kt @@ -0,0 +1,14 @@ +package com.vacgom.backend.global.view + +import org.springframework.http.ResponseEntity +import org.springframework.web.bind.annotation.GetMapping +import org.springframework.web.bind.annotation.RestController + +@RestController +class HomeController { + + @GetMapping("/") + fun getHomePage(): ResponseEntity { + return ResponseEntity.ok().build() + } +}