In AOP programming using declarative methods, you encounter the following two issues, which are resolved as follows :
(1)error at ::0 formal Unbound in pointcut
Workaround : Remove the parameters in the function notification function, for example :
@Before ("Execution" (public void COM. BJSXT. DAO. Impl. Userdaoimpl. *(. .))")
Public void Beforemethod (method method) {
System. out . println ("method before");
}
Switch
@Before ("Execution" (public void COM. BJSXT. DAO. Impl. Userdaoimpl. *(. .))")
Public void Beforemethod () {
System. out . println ("method before");
}
This solution can solve the problem, but has not understood, I hope someone can help solve
(2)error at ::0 can ' t find referenced pointcut MyMethod
Cause of error : If you are using a JDK version of 1. 6 words, while the quoted Aspectjrt. The jar is spring-2. This error is reported in the case of jar packages contained in 0.
The workaround : Download the latest ASPECTJRT jar package to aspectj-1. 6. 6. jar, or use Spring3. 0 in the package!
Error at:: 0 formal Unbound in pointcut