Spring AOP切入点不是很好

Aub*_*ine 9 aop spring spring-aop pointcut

线程"main"中的异常org.springframework.beans.factory.BeanCreationException:创建名为'org.springframework.aop.aspectj.AspectJPointcutAdvisor#0'的bean时出错:bean的实例化失败; 嵌套异常是org.springframework.beans.BeanInstantiationException:无法实例化bean类[org.springframework.aop.aspectj.AspectJPointcutAdvisor]:构造函数抛出异常; 嵌套异常是java.lang.IllegalArgumentException:切入点格式不正确:期望在名称位置49执行'name pattern'(*com.idol.performers.Performer.perform(..)

我的切入点有什么问题?在书中它说

(..) // means taking any arguments
Run Code Online (Sandbox Code Playgroud)

我的xml:

 ...
<aop:before pointcut="execution(*com.idol.performers.Performer.perform(..))" method="takeSeats"/>
 ...
Run Code Online (Sandbox Code Playgroud)

nic*_*ild 13

试试这个:

<aop:before pointcut="execution(* com.idol.performers.Performer.perform(..))" method="takeSeats"/>
Run Code Online (Sandbox Code Playgroud)

问题是你*和之间没有空间com.idol.performers.Performer.perform(..)