@Around("anyRepositoryMethodExecution()") public Object monitor(ProceedingJoinPoint joinPoint) throws Throwable { StopWatch stopWatch = new StopWatch(nameOf(joinPoint)); stopWatch.start(); try { // TODO #4 execute the advised method return joinPoint.proceed(); } finally { stopWatch.stop(); log.info(stopWatch.shortSummary()); } }
public Object monitor(ProceedingJoinPoint joinPoint) throws Throwable { StopWatch stopWatch = new StopWatch(nameOf(joinPoint)); stopWatch.start(); try { // TODO #4 execute the advised method return null; } finally { stopWatch.stop(); log.info(stopWatch.shortSummary()); } }