2
childclass에서 구현 된 메소드에 pointcut을 적용하려고하지만이 Pointcut에서 AspectMethod가 호출되지 않습니다.Pointcut이 추상 메소드에 적용되지 않음
public abstract class ParentClass {
protected abstract void buildResponse(QueryResponse qryResp,ContentSearchServiceResponseImpl cssResp);
}
public class ChildClass extends ParentClass {
@override
public void buildResponse(QueryResponse qryResp,ContentSearchServiceResponseImpl ssResp){
//doSomething
}
포인트 컷 :
<aop:pointcut id="pointcutId"
expression="execution(public * ParentClass.buildResponse(..))" />
또는
이 화면 위의 포인트 컷의 어떤 구성<aop:pointcut id="pointcutId"
expression="execution(protected * ParentClass.buildResponse(..))" />
또는
<aop:pointcut id="pointcutId"
expression="execution(public * ParentClass+.buildResponse(..))" />
은 다음 내 구성 및 코드 되지 않는 created.I 내가
감사합니다. 마지막 세 줄이 주요 문제 해결사입니다. 내 전화는 내부 전화이며 나는 그들에게 pointcut을 적용하려고 노력했다. 그런 방법들을 다루는 다른 방법이 있는가? –
예, aspectj로드 타임 짜기 또는 컴파일 타임 짜기를 사용하십시오. 자세한 내용은 [여기] (http://static.springsource.org/spring/docs/3.1.x/spring-framework-reference/html/aop.html#aop-aj-ltw)를 참조하십시오. – pap