spring 与 struts2 的整合构建 ssh 框架协同运行机制
1、 在 Maven 的 pom.xml 文件中引入 Struts2 核心依赖项。

2、 在 web.xml 中注册 Struts2 的 FilterDispatcher(或 StrutsPrepareAndExecuteFilter),完成对 HTTP 请求的统一拦截与分发处理。

3、 创建并配置 Struts2 所需的核心配置文件,如 struts.xml 及相关常量设置。

4、 实现 Spring 与 Struts2 的深度集成,使二者在容器层面无缝协作。
5、 在 Maven 项目配置中添加 struts2-spring-plugin 依赖,启用 Spring 对 Struts2 Action 的托管能力。

6、 在 Spring 的 applicationContext.xml 中定义 Action Bean,并明确指定其 scope 属性为 prototype,保障多线程环境下的实例隔离性。
7、 在 Struts2 的 action 配置中,class 属性不再直接指向实现类全限定名,而是填写该 Action 在 Spring 容器中注册的 bean 名称。











