ss整合梳理

struts的action没有托管给spring时

1: web.xml 中配置自动装配。(spring的监听器和配置文件,自动装配后会放到servletContext中,供需要它的servlet使用。需要bean的类也是通过spring的类传入servletContext的参数取得的)

2: 通过定义基类继承actionSupport(spring中对struts支持的类)取得aplicatinContext,从而从中get出你所需要的bean。

如果在struts中配置托管给spring。则参照下面连接取得所需要的bean即可。

http://blog.csdn.net/stonehead2008/article/details/2147918

猜你喜欢

转载自salouhim.iteye.com/blog/1344627
ss