【发布时间】:2020-01-11 15:35:18
【问题描述】:
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;
@Aspect
@Component
public class MyDemoLogginAspect {
@Before("execution(* * add*())")
public void beforeAddAccountAdvice(){
System.out.println("Executing before");
}
}
我得到了一个例外原因:
java.lang.IllegalArgumentException: Pointcut is not well-formed: expecting '(' at character position 14
execution(* * add*())
我想知道为什么上面的切入点表达式是错误的?
注意:这个错误是在主类执行后出现的,但主类没有问题,错误是在切入点表达式中
【问题讨论】: