当前位置: 代码迷 >> Java相关 >> 请问struts 2.0如何和spring 结合,请
  详细解决方案

请问struts 2.0如何和spring 结合,请

热度:578   发布时间:2013-02-25 21:50:49.0
请教struts 2.0怎么和spring 结合,请高手指点。
请教struts 2.0怎么和spring 结合,请高手指点。

------解决方案--------------------------------------------------------
在STRUTS-CONFIG.XML中添加plug-in标签对(
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn" >
<set-property property="contextConfigLocation" value="/WEB-INF/applicationContext.xml"/>
</plug-in> ),在SPRING的配置文件(applicationContext.xml)中配置STRUTS中的PATH变量就可以了