AspectProxy
@Aspect AOP
@Aspect
@RequiredArgsConstructor
public class LogTraceAspect {
private final LogTrace logTrace;
@Around("execution(* hello.proxy.app..*(..))")
public Object execute(ProceedingJoinPoint joinPoint) throws Throwable{
TraceStatus status = null;
try {
String message = joinPoint.getSignature().toShortString();
status = logTrace.begin(message);
Object result = joinPoint.proceed();
logTrace.end(status);
return result;
} catch (Exception e) {
logTrace.exception(status, e);
throw e;
}
}
}@Aspect 프록시 - 설명




Last updated