AOPの適用
![](https://s1.md5.ltd/image/91b621df38c1ee1f6907b7fd0426f5ff.png)
@Aspect
@Component
public class TimeTraceAop {
@Around("execution(* com.hello.hellospring..*(..))")
public Object execute(ProceedingJoinPoint joinPoint) throws Throwable {
long start = System.currentTimeMillis();
System.out.println("START: " + joinPoint.toString());
try {
Object result = joinPoint.proceed();
return result;
}finally {
long finish = System.currentTimeMillis();
long timeMs = finish = start;
System.out.println("END: " + joinPoint.toString() + " " + timeMs + "ms");
}
}
}
解決する測定
![](https://s1.md5.ltd/image/62090791e6df39980e003ba7b0823318.png)
![](https://s1.md5.ltd/image/1b9b055d8968991b7371f7ee2c9b33e2.png)
Reference
この問題について(AOPの適用), 我々は、より多くの情報をここで見つけました https://velog.io/@yeonnex/AOP-적용テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol