DWR在Spring中应用
这里以传递一个对象为例,来说明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中应用的更多相关文章
- dwr和spring的整合
1.dwr在spring配置文件的配置: <!-- 注意这里新增加的dwr tag, 为使其生效,文件头中要声明namespace --> <dwr:configuration /& ...
- Velocity初探小结--Velocity在spring中的配置和使用
最近正在做的项目前端使用了Velocity进行View层的数据渲染,之前没有接触过,草草过了一遍,就上手开始写,现在又回头细致的看了一遍,做个笔记. velocity是一种基于java的模板引擎技术, ...
- Spring中Bean的作用域、生命周期
Bean的作用域.生命周期 Bean的作用域 Spring 3中为Bean定义了5中作用域,分别为singleton(单例).protot ...
- Spring中Bean的实例化
Spring中Bean的实例化 在介绍Bean的三种实例化的方式之前,我们首先需要介绍一下什么是Bean,以及Bean的配置方式. 如果 ...
- 模拟实现Spring中的注解装配
本文原创,地址为http://www.cnblogs.com/fengzheng/p/5037359.html 在Spring中,XML文件中的bean配置是实现Spring IOC的核心配置文件,在 ...
- Spring中常见的bean创建异常
Spring中常见的bean创建异常 1. 概述 本次我们将讨论在spring中BeanFactory创建bean实例时经常遇到的异常 org.springframework.beans.fa ...
- Spring中配置数据源的4种形式
不管采用何种持久化技术,都需要定义数据源.Spring中提供了4种不同形式的数据源配置方式: spring自带的数据源(DriverManagerDataSource),DBCP数据源,C3P0数据源 ...
- spring中InitializingBean接口使用理解
InitializingBean接口为bean提供了初始化方法的方式,它只包括afterPropertiesSet方法,凡是继承该接口的类,在初始化bean的时候会执行该方法. 测试程序如下: imp ...
- Quartz 在 Spring 中如何动态配置时间--转
原文地址:http://www.iteye.com/topic/399980 在项目中有一个需求,需要灵活配置调度任务时间,并能自由启动或停止调度. 有关调度的实现我就第一就想到了Quartz这个开源 ...
随机推荐
- 慕课网-安卓工程师初养成-4-7 Java循环语句之 while
来源: http://www.imooc.com/code/1420 生活中,有些时候为了完成任务,需要重复的进行某些动作.如参加 10000 米长跑,需要绕 400 米的赛道反复的跑 25 圈.在 ...
- PMP-产品范围与项目范围区别
如果你对项目管理.系统架构有兴趣,请加微信订阅号"softjg",加入这个PM.架构师的大家庭 1.产品范围--某项产品.服务或成果所具有的特性和功能. 2.项目范围--为交付具有 ...
- linux C中va_list用法
#include <stdio.h> #include <stdarg.h> int demo( int, ... ); int main( void ) { demo(1, ...
- 详细讲解JAVA中的IO流
一.流的概念 流(stream)的概念源于UNIX中管道(pipe)的概念.在UNIX中,管道是一条不间断的字节流,用来实现程序或进程间的通信,或读写外围设备.外部文件等. ...
- Devexpress中WebChartControl控件柱状统计图的做法(数据为调用存储过程)
//前台控件代码:WebChartControl控件: <%-- 月采购量统计--%> <dxchartsui:WebChartControl ID="WebChartCo ...
- CLRS:sorting in linear time O(n)
//intput array A,output array result. count array count . //all the elements is in te range of 0~k ...
- 【MySQL】查询使用临时表
MySQL查询产生临时表的分析 官网说明的地址:http://dev.mysql.com/doc/refman/5.5/en/internal-temporary-tables.html 参考:htt ...
- 入门学习PHP之变量_1
1.函数里只能访问局部变量,不能访问全局变量,如果函数里需要访问全局变量则需要在变量前加global作用域,如下实例: <?php $x=5; $y=10; function myTest() ...
- 值得推荐的C/C++框架和库(转)
值得学习的C语言开源项目 C++ 资源大全 值得学习的C语言开源项目 1.Webbench Webbench是一个在linux下使用的非常简单的网站压测工具.它使用fork()模拟多个客户端同时访问我 ...
- MITM to crack Https connections
Everybody knows that https is http over SSL, and https is a secure way for protecting confidential d ...