<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)
AOP Bean 异常
------解决方案--------------------
缺少aspectjweaver-1.7.2.jar。