I have this aspect:
The ServizioStudente class is:Code:@Aspect public class mailAOP { @Pointcut("execution(* org.rol.services.ServizioStudente.aggiungiStudente(..))") public void nuovoStudente(Studente studente){} @After("nuovoStudente(studente)") public void messaggioRegistrazione(Studente studente){ System.out.println("HO CONCLUSO LA REGISTRAZIONE"); } }
Code:... public boolean aggiungiStudente(Studente studente){.....} .....
In xml...
I get by running:Code:... <aop:aspectj-autoproxy/> <bean id="mailaop" class="org.rol.aop.mailAOP"/> ...
java.lang.IllegalArgumentException: error at ::0 can't find referenced pointcut nuovoStudente
at org.aspectj.weaver.tools.PointcutParser.parsePoint cutExpression(PointcutParser.java:317)
at org.springframework.aop.aspectj.AspectJExpressionP ointcut.buildPointcutExpression(AspectJExpressionP ointcut.java:195)
at org.springframework.aop.aspectj.AspectJExpressionP ointcut.checkReadyToMatch(AspectJExpressionPointcu t.java:181)
at org.springframework.aop.aspectj.AspectJExpressionP ointcut.getClassFilter(AspectJExpressionPointcut.j ava:162)
at org.springframework.aop.support.AopUtils.canApply( AopUtils.java:202)
at org.springframework.aop.support.AopUtils.canApply( AopUtils.java:256)
at org.springframework.aop.support.AopUtils.findAdvis orsThatCanApply(AopUtils.java:288)
why?
thx


Reply With Quote