【发布时间】:2012-02-26 02:09:19
【问题描述】:
我在 webapp 启动时收到此错误
原因: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: error at ::0 切入点中的正式未绑定
这是 xml 的一部分,在底部显示了我的切入点
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
.....省略的东西
<aop:config>
<aop:aspect id="bamAspectAroundID" ref="bamAspectAround">
<aop:pointcut id="bamAroundMethodPointcut" expression="execution(* testBA*(..))" />
<aop:around method="aspectAroundMethod" pointcut-ref="bamAroundMethodPointcut"/>
</aop:aspect>
</aop:config>
在我的一个课程中,我有一个虚拟方法
public void testBAM() {
System.out.println("in testBAM() ");
}
我觉得这个表达还可以。任何指针?我们正在使用aspectj 1.6.2。谢谢。
【问题讨论】: