1、 使用WebApplicationContext:这种方式是在Struts的Action类中获取Spring应用上WebApplicationContext的实例化对象,通过此对象调用Bean。
2、 继承Spring的ActionSupport:这种方式实际上是对第一种方式的一种简化,当Struts的Action类继承了Spring的ActionSupport以后,直接可以使用WebApplicationContext对旬,从而简化对Spring应用上下文的操作。
3、 将Struts的Action托管给Spring:这种方式将Struts的Action以Bean的形式托管给Spring,通过Spring Ioc容器管理各个Action。
本文介绍了三种将Struts与Spring框架集成的方法:使用WebApplicationContext获取Spring实例;通过继承Spring的ActionSupport简化操作;将Struts Action托管给Spring进行管理。
1865

被折叠的 条评论
为什么被折叠?



