我现在定义了一个SPRING AOP切面
<bean id="exceptionHandlereAdvisor"
class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
<property name="advice">
<ref bean="exceptionHandler" />
</property>
<property name="patterns">
<value>.*.*</value>
<!-- 这里配置切入点,可以为正则表达式 -->
</property>
</bean>
本来是对所有方法切入,当时当访问 STRUTS2的action 时发生错误:
>>>>>
执行:intercept时发生异常:java.lang.NoSuchMethodException: $Proxy20.demo()
<<<<<[2010-09-04 16:24:53,828 WARN] - Caught OgnlException while setting property 'excludeMethods' on type '$Proxy16'.
 ognl.NoSuchPropertyException: $Proxy16.excludeMethods
at ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:132)
at com.opensymphony.xwork2.util.OgnlValueStack$ObjectAccessor.setProperty(OgnlValueStack.java:82)
at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656)
at ognl.ASTProperty.setValueBody(ASTProperty.java:101)
at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)
at ognl.SimpleNode.setValue(SimpleNode.java:246)
at ognl.Ognl.setValue(Ognl.java:476)
at com.opensymphony.xwork2.util.OgnlUtil.setValue(OgnlUtil.java:186)
at com.opensymphony.xwork2.util.OgnlUtil.internalSetProperty(OgnlUtil.java:360)
at com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:76)
at com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:103)
at com.opensymphony.xwork2.util.OgnlUtil.setProperties(OgnlUtil.java:90)