日期:2014-05-17  浏览次数:20664 次

struts1+spring3 action无法开启prototype模式
在一个页面上有两个请求,有先后顺序,向同一个action发送请求
架构是 struts1+spring3 spring开启自动扫描模式,action如下
@Controller("/***Action")
@Scope("prototype")
public class ***Action extends Action{
   public ActionForward execute(ActionMapping actionMapping, ActionForm actionForm,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
System.out.println(this);
                //...
}

后台的打印显示
***Action@84506d
***Action@84506d

不是说加了@Scope("prototype")后每次请求action都会产生新的实例吗?怎么还是一样的?求大神开导~
struts1 spring prototype 注解

------解决方案--------------------
struts1的action是个单例