Caused by:java.lang.IllegalArgumentException:error at:: 0 can ' t find referenced pointcut
Workaround:
1, version problem. Look at your version. Mine is JDK1.7. The corresponding jar package is Aspectjweaver-1.6.6.jar and Aspectjrt-1.6.6.jar
2, spelling mistakes. The code has an error. can refer to my.
3, if it's not resolved. can leave a message.
Package com.snow.aspect;
Import Org.aspectj.lang.annotation.After;
Import Org.aspectj.lang.annotation.Aspect;
Import Org.aspectj.lang.annotation.Before;
Import Org.aspectj.lang.annotation.Pointcut;
Import org.springframework.stereotype.Component;
@Component
@Aspect Public
class Logaspect {
@Pointcut (' Execution (public void Com.snow.dao.*.add ()) ') Public
void Logcut4add () {
}
@Before (' Logcut4add () ') public
Void before () {
System.out.println ("Before .... ..."),
"the" (")" @After ("Logcut4add ()") Public
Void after () {System.out.println ("after ... .... ...
"),
}
}