spring struts1 管理action
来源:互联网 发布:知乎商业模式 编辑:程序博客网 时间:2024/06/05 17:54
业务对象创建了,单例的action也创建了,
如果用spring去管理,可以创建多例的action。
那spring怎么生成Action呢?
1.用注解或在配置文件中配置要纳入spring管理的action,并将type设置为prototype,这样在运行的时候会生成相应的action
2.在struts配置文件配置type为"....DelegatingActionProxy",这个action继承自Action
这个代理对象的execute方法中会执行getDelegateAction这个方法(内容是:先得到工厂,再去找path,然后从springbean工厂中得到多例的Action,进而注入业务对象,再执行execute方法)
优点:克服了struts1的单例的缺点,偷梁换柱,生成了多例的Action,大大的提高了效率。
0 0
- spring struts1 管理action
- Spring 管理Struts2 Action
- struts2,spring管理action
- Spring管理Struts Action
- Struts1 Action
- struts1+struts2+spring实例化action的线程安全问题
- Spring管理Action类和Struts2管理Action类比较
- struts1.3.8 -- 动态Action
- java 线程 struts1 action
- Struts1 action 下载附件
- struts1中action参数
- Struts1 Action 属性详解
- Struts1 - 学习笔记 - Action
- struts1 action线程安全问题
- Struts1之Action小结
- Struts1之Action
- Struts1中的<action>标签
- Struts1中的<action>标签
- 16.10.6 C组总结
- 验证码的生成
- was cached in the local repository, resolution will not be reattempted until(Maven常见问题)
- 弱校联萌 BNU I. Increasing or Decreasing
- win32快速实现listctrl控件的可编辑子项
- spring struts1 管理action
- 美团2017笔试题 给定一颗多叉树
- P1315 观光公交
- clusterinit初始化环境脚本
- ccpc东北四——重现赛
- 161006
- Codeforces722C-Destroying Array(线段树 or 并查集)
- 判断一窜字符串当中同一个单词出现的频率次数
- JavaScript对象和数组