Skip to content

Commit

Permalink
✨ [Feat] health check API 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
Eunjin3395 committed Feb 7, 2025
1 parent 233ce11 commit 0798ce2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/com/gamegoo/gamegoo_v2/HomeController.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,10 @@ public ApiResponse<Object> error() {
throw new GlobalException(ErrorCode._BAD_REQUEST);
}

@Operation(summary = "Health Check", description = "health check를 위한 API 입니다.")
@GetMapping("/healthcheck")
public ApiResponse<String> healthcheck() {
return ApiResponse.ok("OK");
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ public SecurityFilterChain filterChain(HttpSecurity http, JwtAuthFilter jwtAuthF
.requestMatchers(
"/swagger-ui/**",
"/v3/api-docs/**").permitAll()
.requestMatchers("healthcheck").permitAll()
.anyRequest().authenticated());

// 커스텀 필터 추가
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/excluded-paths.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
security:
jwt:
excluded-matchers:
- pattern: /healthcheck
- pattern: /swagger-ui/*
- pattern: /v3/api-docs/*
- pattern: /v3/api-docs
Expand Down

0 comments on commit 0798ce2

Please sign in to comment.