0
클래스의 Object의 getDescription 메소드가 aspect에 의해 가로 채졌다. 객체 자체의 인스턴스에 액세스하려면 어떻게해야합니까?@Around annotation에 의해 인터셉트 된 객체의 핸들을 얻는다.
@Around("execution(String com.*.*.*.Title.getDescription(..))")
public String getInternationalizedTitleDescription(ProceedingJoinPoint joinPoint) throws Throwable {
if (something){
return joinPoint.proceed();
} else {
//here I need access to instance to Title
//Title t = joinPoint.getObject();
//return SomeOtherObject.getTitleData(t);
}
}
둘의 차이점은 무엇입니까? – riship89
@ riship89 javadoc (및 따옴표) 및 [이 이전 질문] (http://stackoverflow.com/questions/22848738/can-somebody-explain-this-target-pointcut-designators/22849166#22849166)을 참조하십시오. –