67,513
社区成员
发帖
与我相关
我的任务
分享
<aop:config>
<aop:aspect id="sec" ref="provincesAop">
<aop:pointcut id="allAddMethod" expression="execution(* com.am8.mutual.action..*.*(..))"/>
<!-- 例外通知 -->
<aop:after-throwing method="throwingx" pointcut-ref="allAddMethod"/>
<!-- 前置通知 -->
<aop:before method="checkSecurity" pointcut-ref="allAddMethod" />
<!-- 后置通知 -->
<aop:after-returning method="after" pointcut-ref="allAddMethod"/>
</aop:aspect>
</aop:config>
/**
* 例外通知
*/
private void throwingx(Exception execution){
System.out.println("*****************异常信息如下**************");
System.out.println(execution);
}
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'provincesAction' defined in file [D:\apache-tomcat-6.0.33\webapps\am8\WEB-INF\classes\com\am8\mutual\resources\applicationContext-action.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': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.aop.aspectj.AspectJPointcutAdvisor]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: error at ::0 formal unbound in pointcut