nested exception is java.lang.IllegalArgumentException: Pointcut is not well-formed

在用AOP 的时候出现了如下的错误,

警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'atrthmeticCalculatorImpl' defined in file [D:\workspaceSpring\SpringAOP\bin\com\myth\spring\aop\impl\AtrthmeticCalculatorImpl.class]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Pointcut is not well-formed: expecting ')' at character position 70
execution(int com.myth.spring.aop.impl.AtrthmeticCalculatorImpl.*(int i,..))

 

这个是因为前置或者后置的 execution(int com.myth.spring.aop.impl.AtrthmeticCalculatorImpl.*(int i,..)参数没写对导致的

改成如下格式就好了  可以用*通配@After("execution(int com.myth.spring.aop.impl.AtrthmeticCalculatorImpl.*(int , int))")

posted on 2017-08-15 17:02  哆啦任意门  阅读(453)  评论(0编辑  收藏  举报

导航