Struts2整合Spring无法获取到网页传过来的参数

来源:互联网 发布:淘宝网上的女装 编辑:程序博客网 时间:2024/06/01 10:24

在做Struts2、Spring整合时发现Struts2定义的Action无法注入网页的参数值,set方法始终没有被调用,而且Tomcat的日志还出现警告信息:

com.opensymphony.xwork2.ognl.SecurityMemberAccess warn警告: The use of the default (unnamed) package is discouraged!

如果Spring不接管Struts2、单独使用Struts2配置Action又正常,后来才发现Action被Spring 切面所拦截。

解决办法:在Spring容器中配置下面信息

<aop:config proxy-target-class="true"> </aop:config>
阅读全文
0 0