这里以传递一个对象为例,来说明dwr在Spring中是怎么配置的。

JSP页面:
<script src='dwr/interface/instructionOuterService.js'></script>
<script src='dwr/engine.js'></script>
<script src='dwr/util.js'></script>
var instructionOuter =
{
id: 1,
name: 'myName'
}; //设置同步
DWREngine.setAsync(false);
instructionOuterService.checkSameIns(instructionOuter,function(date){
return ;
}); Dwr.xml文件:
<create creator="spring" javascript="instructionOuterService">
<param name="beanName" value="instructionOuterService" />
<include method="checkSameInsById" />
</create>
<convert converter="bean" match="com.nstc.wst.model.InstructionOuter">
<param name="include" value="id,name" />
</convert> Spring配置:
<bean id="instructionOuterService" class="com.nstc.wst.server.InstractionCheckService" autowire="byName">
<property name="paymentHelper"><ref bean="paymentHelper"/></property>
</bean>

DWR在Spring中应用的更多相关文章

  1. dwr和spring的整合

    1.dwr在spring配置文件的配置: <!-- 注意这里新增加的dwr tag, 为使其生效,文件头中要声明namespace --> <dwr:configuration /& ...

  2. Velocity初探小结--Velocity在spring中的配置和使用

    最近正在做的项目前端使用了Velocity进行View层的数据渲染,之前没有接触过,草草过了一遍,就上手开始写,现在又回头细致的看了一遍,做个笔记. velocity是一种基于java的模板引擎技术, ...

  3. Spring中Bean的作用域、生命周期

                                   Bean的作用域.生命周期 Bean的作用域 Spring 3中为Bean定义了5中作用域,分别为singleton(单例).protot ...

  4. Spring中Bean的实例化

                                    Spring中Bean的实例化 在介绍Bean的三种实例化的方式之前,我们首先需要介绍一下什么是Bean,以及Bean的配置方式. 如果 ...

  5. 模拟实现Spring中的注解装配

    本文原创,地址为http://www.cnblogs.com/fengzheng/p/5037359.html 在Spring中,XML文件中的bean配置是实现Spring IOC的核心配置文件,在 ...

  6. Spring中常见的bean创建异常

    Spring中常见的bean创建异常 1. 概述     本次我们将讨论在spring中BeanFactory创建bean实例时经常遇到的异常 org.springframework.beans.fa ...

  7. Spring中配置数据源的4种形式

    不管采用何种持久化技术,都需要定义数据源.Spring中提供了4种不同形式的数据源配置方式: spring自带的数据源(DriverManagerDataSource),DBCP数据源,C3P0数据源 ...

  8. spring中InitializingBean接口使用理解

    InitializingBean接口为bean提供了初始化方法的方式,它只包括afterPropertiesSet方法,凡是继承该接口的类,在初始化bean的时候会执行该方法. 测试程序如下: imp ...

  9. Quartz 在 Spring 中如何动态配置时间--转

    原文地址:http://www.iteye.com/topic/399980 在项目中有一个需求,需要灵活配置调度任务时间,并能自由启动或停止调度. 有关调度的实现我就第一就想到了Quartz这个开源 ...

随机推荐

  1. 【LeetCode】14. Longest Common Prefix 最长前缀子串

    题目: Write a function to find the longest common prefix string amongst an array of strings. 思路:求最长前缀子 ...

  2. python基础set

    1.set set是一个无序的不重复的集合 li=[11,22,33,11] s=set(li) print(s) {11,22,33}  set提供的方法 1.add(self, *args, ** ...

  3. 【测试】trunc和round的区别

    trunc是截断:round是四舍五入:下面通过一个例子具体看一下trunc和round的不同 SQL),trunc() from dual; TRUNC() TRUNC() ------------ ...

  4. oracle创建job权限

    grant create job to ja_ods; grant manage scheduler to ja_ods;

  5. ASPxGridView中批量提交及个别提交的写法

    //获取chech box ID protected string GetProtoID() { string protoId = ""; //获取选中的记录Id List< ...

  6. devexpress中如何绑定ASPxTreeList控件

    效果图: //前端控件代码: <dx:ASPxTreeList ID="Tree_Gooslist" AutoGenerateColumns="False" ...

  7. CSS常用布局整理

    固定宽度布局 1-2-1布局(浮动) <html xmlns="http://www.w3.org/1999/xhtml"> <head> <titl ...

  8. landsat8简介

    简介 2013年2月11号,NASA 成功发射了 Landsat 8 卫星,为走过了四十年辉煌岁月的 Landsat 计划重新注入新鲜血液.LandSat- 8上携带有两个主要载荷:OLI和TIRS. ...

  9. 对apply和call的理解

    存在的原因: call和apply是为了动态改变this而出现的,当一个object没有某个方法,但是其他的有,我们可以借助call或apply用其它对象的方法来操作. call 和 apply 都是 ...

  10. Use EnCase to acquire data from a smartphone

    Yesterday someone asked me a question can EnCase acquire data from a smartphone, and my reply was &q ...