Skip to content

Commit

Permalink
#16 [fix] : add healthCheck
Browse files Browse the repository at this point in the history
  • Loading branch information
Ganghee-Lee-0522 committed Aug 20, 2024
1 parent 9c43f35 commit 185bc74
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/main/java/devocean/tickit/controller/TestController.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,9 @@ public ApiResponse<?> signUp(@RequestBody TestSignInRequestDto requestDto) {
public ApiResponse<?> logIn(@RequestBody TestLogInRequestDto requestDto) {
return testService.logInfotDev(requestDto);
}

@PostMapping("/health")
public String healthCheck() {
return "Hello World!";
}
}
1 change: 1 addition & 0 deletions src/main/java/devocean/tickit/global/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public class SecurityConfig {
private String apiVersion = "/api/v1";
private String[] attendeeList = {
"/", "/**",
"/health",
"/test", "/test/**",
"/user", "/users/**",
"/events", "/events/**",
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/devocean/tickit/global/jwt/JwtFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected void doFilterInternal(HttpServletRequest request, HttpServletResponse
@Override
protected boolean shouldNotFilter(HttpServletRequest request) throws ServletException {
String path = request.getRequestURI();
return path.startsWith("/api/v1/test") | path.startsWith("/api/v1/auth") | path.equals("/")// 일단 모든 경로에 대해 열어두었음
return path.startsWith("/api/v1/test") | path.startsWith("/api/v1/auth") | path.equals("/") | path.equals("/api/v1/test/health")
;
}
}

0 comments on commit 185bc74

Please sign in to comment.