ERR----spring----Pointcut is not well-formed: expecting ')' at character position

在联系Spring 项目时,遇到该问题。

Caused by: java.lang.IllegalArgumentException: 
Pointcut is not well-formed: expecting ')' at character position 12

意思是,切入点设置格式不对。

源代码:

 //前置通知:在目标方法之前执行
@Before("execute(int com.lishenhuan.aop.impl.ArithmeticCalculator.add(int, int))")
public void before() {
	System.out.println("before");
}

原因:@Before("execute(int com.lishenhuan.aop.impl.ArithmeticCalculator.add(int, int))")中execute参数不对

         @Before("execution(int com.lishenhuan.aop.impl.ArithmeticCalculator.add(int, int))")

猜你喜欢

转载自blog.csdn.net/lsh15846393847/article/details/88974534
今日推荐