
Spring2024. 10. 1. 23:28Spring AOP - @target을 단독으로 사용할 수 없는 이유에 대해
다음 포인트컷 지시자는 단독으로 사용하면 안된다. args, @args, @target@Around("execution(* hello.aop..*(..)) && @target(hello.aop.member.annotation.ClassAop)")public Object atTarget(ProceedingJoinPoint joinPoint) throws Throwable { log.info("[@target] {}", joinPoint.getSignature()); return joinPoint.proceed();}해당 예제를 보면 execution(* hello.aop..*(..)) 를 통해 적용 대상을 줄여준 것을 확인할 수 있다.= AOP 적용 대상을 hello.aop 하위의 패키지들로 한..