health check 추가

This commit is contained in:
USER
2022-09-05 16:03:26 +09:00
parent 0360eff3b6
commit 5591a1a1aa
3 changed files with 25 additions and 2 deletions

View File

@@ -0,0 +1,22 @@
package kr.co.uplus.ez.api.comm;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@RestController
@RequestMapping("/common")
public class HealthCheckController {
/*
* health check 용도로 사용(로직 없음)
*/
@GetMapping("/healthChk")
public void healthChk()
{
log.debug("health check success.");
return;
}
}

View File

@@ -40,7 +40,7 @@ public class JwtAuthHeaderFilter extends JwtAuthFilter {
// 1. access token이 저장된 헤더 읽기 // 1. access token이 저장된 헤더 읽기
String header = request.getHeader(jwtProps.getHeader().toLowerCase()); String header = request.getHeader(jwtProps.getHeader().toLowerCase());
log.info("header authToken: {}" , header); //log.info("header authToken: {}" , header);
// 2. 헤더 값 검사 // 2. 헤더 값 검사
if(header == null || !header.startsWith(jwtProps.getPrefix())) { if(header == null || !header.startsWith(jwtProps.getPrefix())) {
return null; return null;

View File

@@ -59,6 +59,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
"/", "/",
"/socket/**", "/socket/**",
"/api/v1/bo/sendNumMgt/filedownload" "/api/v1/bo/sendNumMgt/filedownload"
,"/common/healthChk"
}; };
private static final String[] AUTH_URL_ARRAY = { private static final String[] AUTH_URL_ARRAY = {