把struts 1*的action 交给 spring管理 需要改动以下两点
struts-config.xml
1、加入Spring 插件
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
<!--指向Spring 容器 applicationContext.xml-->
<set-property property="contextConfigLocation"
value="/WEB-INF/spring/applicationContext.xml" />
</plug-in>
2、更改Action 的类为 spring 的 action 代理类
<action .....
type="org.springframework.web.struts.DelegatingActionProxy">
..........
</action>
在Spring 容器 applicationContext.xml 可以对该 action 进行管理了
eg:
<bean name="/url" class="类路径">
<property name="serv">
<ref bean="serverImpl" />
</property>
</bean>
在spring 1.0中可以配置 单粒为FALSE,我用的是spring 2.0 没找到 单粒的配置,有时间在想办法