关于SpringAOP关于建议返回struts请求

关于SpringAOP关于建议返回struts请求,spring,struts2,aop,Spring,Struts2,Aop,各位,我对spring aop有一个问题。当我使用基于配置文件的around建议时,它将返回strust请求。但它不起作用。打击表明: public Object invoke(ProceedingJoinPoint-joinPoint)抛出Throwable { return joinPoint.procedure();//这将返回'addamp'; } struts.xml的格式如下: <action name="xxxx" class="xxx"> <re

各位,我对spring aop有一个问题。当我使用基于配置文件的around建议时,它将返回strust请求。但它不起作用。打击表明:

public Object invoke(ProceedingJoinPoint-joinPoint)抛出Throwable
{
return joinPoint.procedure();//这将返回'addamp';
}

struts.xml的格式如下:

<action name="xxxx" class="xxx">
        <result name="addEmp">pers_xxx.action</result>
    </action>

pers_xxx.action

我是怎么做到的?

你的问题不清楚。Spring AOP基本上是一个拦截器。Struts2已经有了一个很好的拦截器堆栈。为什么需要使用AOP?只需使用现有的Struts2拦截器或编写一个自定义拦截器。感谢阅读。但我认为是自由创造者引起了这个问题。谢谢