码迷,mamicode.com
首页 > 编程语言 > 详细

struts2 与spring整合

时间:2017-05-25 20:43:44      阅读:168      评论:0      收藏:0      [点我收藏+]

标签:rac   tracking   ati   jar   插件   content   str   产生   app   

要把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整合

标签:rac   tracking   ati   jar   插件   content   str   产生   app   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!