|
|
@ -129,12 +129,12 @@ public class AccessLogAspect {
|
|
|
|
accessLog.setResponseFail(String.format("%s: %s", e.getErrCd(), e.getMessage()));
|
|
|
|
accessLog.setResponseFail(String.format("%s: %s", e.getErrCd(), e.getMessage()));
|
|
|
|
accessLogRepository.save(accessLog);
|
|
|
|
accessLogRepository.save(accessLog);
|
|
|
|
if (result == null) {
|
|
|
|
if (result == null) {
|
|
|
|
EnsResponseVO restResponseVO = EnsResponseVO
|
|
|
|
EnsResponseVO<?> restResponseVO = EnsResponseVO
|
|
|
|
.errBuilder()
|
|
|
|
.errBuilder()
|
|
|
|
.errCode(e.getErrCd())
|
|
|
|
.errCode(e.getErrCd())
|
|
|
|
.errMsg(e.getMessage())
|
|
|
|
.errMsg(e.getMessage())
|
|
|
|
.build();
|
|
|
|
.build();
|
|
|
|
result = new ResponseEntity<EnsResponseVO>(restResponseVO, HttpStatus.INTERNAL_SERVER_ERROR);
|
|
|
|
result = new ResponseEntity<>(restResponseVO, HttpStatus.INTERNAL_SERVER_ERROR);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
|
|
|
|
|
|
@ -142,12 +142,12 @@ public class AccessLogAspect {
|
|
|
|
accessLog.setResponseFail(String.format("%s: %s", EnsErrCd.UNKNOWN, CmmnUtil.printStackTraceToString(e)));
|
|
|
|
accessLog.setResponseFail(String.format("%s: %s", EnsErrCd.UNKNOWN, CmmnUtil.printStackTraceToString(e)));
|
|
|
|
accessLogRepository.save(accessLog);
|
|
|
|
accessLogRepository.save(accessLog);
|
|
|
|
if (result == null) {
|
|
|
|
if (result == null) {
|
|
|
|
EnsResponseVO restResponseVO = EnsResponseVO
|
|
|
|
EnsResponseVO<?> restResponseVO = EnsResponseVO
|
|
|
|
.errBuilder()
|
|
|
|
.errBuilder()
|
|
|
|
.errCode(EnsErrCd.UNKNOWN)
|
|
|
|
.errCode(EnsErrCd.UNKNOWN)
|
|
|
|
.errMsg("알수없는 오류 입니다. 시스템관리자에게 문의하시기 바랍니다.")
|
|
|
|
.errMsg("알수없는 오류 입니다. 시스템관리자에게 문의하시기 바랍니다.")
|
|
|
|
.build();
|
|
|
|
.build();
|
|
|
|
result = new ResponseEntity<EnsResponseVO>(restResponseVO, HttpStatus.INTERNAL_SERVER_ERROR);
|
|
|
|
result = new ResponseEntity<>(restResponseVO, HttpStatus.INTERNAL_SERVER_ERROR);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
applicationEventPublisher.publishEvent(MonitorEvent.builder()
|
|
|
|
applicationEventPublisher.publishEvent(MonitorEvent.builder()
|
|
|
@ -370,7 +370,6 @@ public class AccessLogAspect {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// FIXME: JPA 쿼리 로그 출력 코드 추가
|
|
|
|
// FIXME: JPA 쿼리 로그 출력 코드 추가
|
|
|
|
//@ConditionalOnProperty(value = "app.jpa.logging.enabled", havingValue = "true", matchIfMissing = false)
|
|
|
|
|
|
|
|
@Around("execution(* org.springframework.data.repository.CrudRepository+.*(..))")
|
|
|
|
@Around("execution(* org.springframework.data.repository.CrudRepository+.*(..))")
|
|
|
|
public Object logJpaQuery(ProceedingJoinPoint joinPoint) throws Throwable {
|
|
|
|
public Object logJpaQuery(ProceedingJoinPoint joinPoint) throws Throwable {
|
|
|
|
String methodName = joinPoint.getSignature().getDeclaringType().getSimpleName() + "." + joinPoint.getSignature().getName();
|
|
|
|
String methodName = joinPoint.getSignature().getDeclaringType().getSimpleName() + "." + joinPoint.getSignature().getName();
|
|
|
|