Skip to content

Commit 0042889

Browse files
committed
health check
1 parent ef3f1ed commit 0042889

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package com.devoops.rentalbrain.common.healthcheck;
2+
3+
import org.springframework.web.bind.annotation.GetMapping;
4+
import org.springframework.web.bind.annotation.RestController;
5+
6+
@RestController
7+
public class HealthController {
8+
@GetMapping("/health")
9+
public String healthCheck() {
10+
return "I'm OK";
11+
}
12+
}

rental-brain/src/main/java/com/devoops/rentalbrain/security/JwtFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public JwtFilter(JwtUtil jwtUtil,
3131
@Override
3232
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
3333
String path = request.getRequestURI();
34-
if (path.equals("/auth/validate")||path.equals("/login")) {
34+
if (path.equals("/auth/validate")||path.equals("/login")||path.equals("/health")) {
3535
filterChain.doFilter(request, response);
3636
return;
3737
}

0 commit comments

Comments
 (0)