首页 > 编程语言 > 详细

struts2 与spring整合

时间:2017-05-25 20:26:12      阅读:191      评论:0      收藏:0      [点我收藏+]
要把struts2的action交给spring管理,这样spring才干帮struts2注入须要的的bean(一開始action是由struts初始化,所以想注入spring里面的bean是注入不了的)
struts2 的filter生成action的时候由spring管理
struts2向spring要action
struts2是主导(struts2有个插件,要action的时候向这个插件要)
struts2向spring要。你帮我把action初始化,spring帮strus产生action,所以想注入就注入


1 要把beans.xml配置到web.xml  让application一启动就载入beans,用listener
2 把action交给spring管理 增加struts-spring  jar包

struts2 与spring整合

原文:http://www.cnblogs.com/mthoutai/p/6905636.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!