码迷,mamicode.com
首页 > 编程语言 > 详细

Spring与Struts整合

时间:2016-05-30 23:13:05      阅读:286      评论:0      收藏:0      [点我收藏+]

标签:

正常的spring与struts工程文件所需jar包及配置条件下,增加如下配置:

struts.xml

增加:<constant name="struts.objectFactory" value="spring" />

配置action的时候,class直接写spring配置文件(applicationContext.xml)中的bean的ID

增加:struts2-spring-plugin-2.3.28  Jar包即可;

注意在applicationContext.xml配置bean的时候,

<bean id="userAction" class="com.pt.UserAction" scope="singleton">
</bean>

指定为单例模式

 SSI整合后的程序:http://download.csdn.net/detail/panpanteng/9535879

 

Spring与Struts整合

标签:

原文地址:http://www.cnblogs.com/tengpan-cn/p/5544142.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!