aop的这段代码有神马问题??在线等啊
本帖最后由 xuxinsong1991 于 2013-07-04 13:48:36 编辑
<aop:config>
<aop:aspect id="logBefore" ref="BeforeAdvice">
<aop:before pointcut="execution(* hbn.myUtil..*.*(..))"
method="before"/>
</aop:aspect>
</aop:config>
报错:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myUtil' defined in ServletContext resource [/WEB-INF/hbn.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.aspectj.AspectJPointcutAdvisor#0': Cannot create inner bean '(inner bean)' of type [org.springframework.aop.aspectj.AspectJMethodBeforeAdvice] while setting constructor argument; nested exception is org.springframework.beans.factory.
BeanCreationException: Error creating bean with name '(inner bean)': Cannot create inner bean '(inner bean)' of type [org.springframework.aop.aspectj.AspectJExpressionPointcut] while setting constructor argument; nested exception is org.springframework.beans.factory.
BeanCreationException: Error creating bean with name '(inner bean)': Instantiation of bean failed; nested exception is
java.lang.NoClassDefFoundError: org/aspectj/weaver/tools/PointcutDesignatorHandler
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:457)
------解决方案--------------------缺少aspectjweaver-1.7.2.jar。