File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
src/main/java/com/rhkr8521/mapping Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ package com .rhkr8521 .mapping .api .health .controller ;
2+
3+ import com .rhkr8521 .mapping .common .response .ApiResponse ;
4+ import com .rhkr8521 .mapping .common .response .SuccessStatus ;
5+ import io .swagger .v3 .oas .annotations .Operation ;
6+ import io .swagger .v3 .oas .annotations .tags .Tag ;
7+ import lombok .RequiredArgsConstructor ;
8+ import org .springframework .http .ResponseEntity ;
9+ import org .springframework .web .bind .annotation .GetMapping ;
10+ import org .springframework .web .bind .annotation .RequestMapping ;
11+ import org .springframework .web .bind .annotation .RestController ;
12+
13+ @ Tag (name = "Health" , description = "서버 상태 관련 API 입니다." )
14+ @ RestController
15+ @ RequiredArgsConstructor
16+ @ RequestMapping ("/health" )
17+ public class HealthCheckController {
18+
19+ @ Operation (
20+ summary = "Health 체크 API" ,
21+ description = "서버가 정상인지 체크하는 API 입니다."
22+ )
23+ @ GetMapping ()
24+ public ResponseEntity <ApiResponse <Void >> getHealthCheck () {
25+ return ApiResponse .success_only (SuccessStatus .SEND_SERVER_OK );
26+ }
27+ }
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ public enum SuccessStatus {
1212 /**
1313 * 200
1414 */
15+ SEND_SERVER_OK (HttpStatus .OK , "서버 응답 성공" ),
1516 SEND_OAUTH2_ACCESSTOKEN_SUCCESS (HttpStatus .OK ,"OAuth2 인가코드 발급 성공" ),
1617 SEND_LOGIN_SUCCESS (HttpStatus .OK , "로그인 성공" ),
1718 SEND_REISSUE_TOKEN_SUCCESS (HttpStatus .OK ,"토큰 재발급 성공" ),
You can’t perform that action at this time.
0 commit comments