<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
<!-- loading jdbc.properties -->
<bean id="configBean" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location">
<value>classpath:jdbc.properties</value>
</property>
</bean>
<!-- configuration data source -->
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="${jdbc.driverClassName}"/>
<property name="url" value="${jdbc.url}"/>
<property name="username" value="${jdbc.username}"/>
<property name="password" value="${jdbc.password}"/>
</bean>
<bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="configLocation" value="classpath:naming-sql.xml"/>
</bean>
<tx:advice id="transactionManagerAdivice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="*"
isolation="READ_COMMITTED"
propagation="REQUIRED"
rollback-for="java.lang.RuntimeException"/>
</tx:attributes>
</tx:advice>
<aop:config proxy-target-class="true">
<aop:pointcut id="allManagerMethod" expression="execution(* org.swj.site.dao.*.*(..))"/>
<aop:advisor advice-ref="transactionManagerAdivice" pointcut-ref="allManagerMethod"/>
</aop:config>
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource"/>
</bean>
</beans>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<bean id="encodingFilter" class="org.swj.site.filter.EncodingFilter"/>
<bean id="staff" class="org.swj.site.domain.Staff"/>
<bean id="excelUtil" class="org.swj.site.util.ExcelUtil"/>
<bean id="staffDao" class="org.swj.site.dao.StaffDao">
<property name="sqlMapClient" ref="sqlMapClient"/>
<property name="excelUtil" ref="excelUtil"/>
<property name="staff" ref="staff"/>
</bean>
<bean id="staffService" class="org.swj.site.service.StaffService">
<property name="staffDao" ref="staffDao"/>
</bean>
<bean id="staffAction" class="org.swj.site.web.StaffAction">
<property name="staff" ref="staff"/>
<property name="staffService" ref="staffService"/>
</bean>
</beans>
<?xml version="1.0" encoding="utf-8"?>
<decorators defaultdir="/page">
<excludes>
<pattern>/jsp/*.jsp</pattern>
</excludes>
<decorator name="main" page="decorator/main.jsp">
<pattern>*.action</pattern>
</decorator>
</decorators>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dwr PUBLIC
"-//GetAhead Limited//DTD Direct Web Remoting 2.0//EN"
"http://getahead.org/dwr/dwr20.dtd">
<dwr>
<allow>
<convert converter="bean" javascript="Staff" match="org.swj.site.domain.Staff"/>
<create creator="spring" javascript="JStaffService">
<param name="beanName" value="staffService"/>
<include method="selectAllStaff"/>
<include method="updateStaff"/>
</create>
</allow>
</dwr>
<%@page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<div id="footer"></div>
<%@page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<div id="header">
<div id="site-name">
华侨城
</div>
</div>
<%@page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="decorator" uri="sitemesh-decorator"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery-1.8.2.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/dwr/engine.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/dwr/util.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/dwr/interface/Staff.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/dwr/interface/JStaffService.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/util.js"></script>
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/resources/css/screen.css" media="all"/>
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/resources/css/main.css" media="all"/>
</head>
<body>
<%@include file="/page/decorator/header.jsp"%>
<div id="content-wrap">
<div id="utility">
<table border="0">
<tr>
<td>
<ul>
<li><a href="upload.action">Excel Upload</a></li>
<li><a href="list.action">List</a></li>
<li><a href="lottery.action">Lottery</a></li>
</ul>
</td>
</tr>
</table>
</div>
<div id="content">
<table border="0">
<tr>
<td><decorator:body/></td>
</tr>
</table>
</div>
</div>
<%@include file="/page/decorator/footer.jsp"%>
</html>
分享到:
相关推荐
spring+struts+hibernate+jbpm+dwr整合开发的OA办公系统源码
spring+struts+hibernate+dwr+jstl做的实例.rar
Spring+Struts+Hibernate+DWR集成教程.rar saivicky出品!必属精品!
DWR+Struts+spring+hibernate的订货系统,自己添加的dwr功能
使用struts2、hibernate、spring、dwr整合的简单项目。包括级联等 注意:csdn上面显示为chm文件。该文件为.7z的压缩文件。用压缩软件可以打开的 csdn弄错了
spring+ibatis+struts2+dwr反转 加上上面的 spring+ibatis+struts2+dwr反转部分架包 在按照说明执行上面的脚本运行项目就可以看到效果了
一个struts2+spring+hibernate+dwr的小实例,不过木有搭建说明,不过有dwr的使用说明,至于表结构可以看映射配置文件就知道创建什么表了
用户注册和登录是每个系统的必须存在的一部分,基于Dwr+Struts2+Spring+Hibernate写了一个用户登录注册系统。 其中用Dwr去进行用户注册的用户是否存在的验证。 全部业务控制交由Spring去进行处理。事务处理也...
struts2+hibernate+spring+dwr(用户注册)struts2+hibernate+spring+dwr(用户注册)
总结,该例示注释非常详细,演示Spring托管Hibernate和Struts的Action, 以及Spring的事务声明(包括1.x与2.x的用法)与非事务声明的使用方式。 使用DWR可以方便的使用Spring托管的持久层功能。 目的:希望广大Java...
Struts2 + spring + hibernate + dwr 完美整合代码 dwr 用户注册 多级下拉联动 刷新表格.. 全部代码
spring+ibatis+struts2+dwr反转部分架包
以用户管理为例,结合spring struts hibernate dwr jstl做的实例,struts hibernate dwr 与Spring完全结合,实现用户列表、信息增、删、改、查、维护时用户重名提示等功能,还包括页面自动转码设置(web.xml),...
struts1+spring+hibernate+dwr 项目 满意度调查struts1+spring+hibernate+dwr 项目 满意度调查struts1+spring+hibernate+dwr 项目 满意度调查struts1+spring+hibernate+dwr 项目 满意度调查
Spring+Struts2+Hibernate整合框架的全部jar包,同时还有DWRjar包,MD5,放在工程中直接可用,无冲突
我自己做的spring3+struts2+hibernate3+dwr3+spring security3+ajax请求+数据库配置权限 完整实例
NULL 博文链接:https://jsrookie.iteye.com/blog/294756
自己搭建的spring3+struts2+hibernate+dwr框架
Struts+Hibernate+Spring+DWR实例