首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

DWR3.0 Spring2.5 annotation调整 采用DwrSpringServlet 和 dwr:annotation-scan

2012-10-25 
DWR3.0 Spring2.5 annotation整合 采用DwrSpringServlet 和 dwr:annotation-scan参考了网上的很多资料 把d

DWR3.0 Spring2.5 annotation整合 采用DwrSpringServlet 和 dwr:annotation-scan
参考了网上的很多资料 把dwr3和spring整合的过程梳理一下
采用了DwrSpringServlet 和 dwr3的新功能 dwr:annotation-scan

首先是xml


Spring的配置文件

最后是测试类
package com.sandbox.actions.test;import org.directwebremoting.annotations.RemoteMethod;import org.directwebremoting.annotations.RemoteProxy;import org.springframework.stereotype.Controller;import com.cxl.base.actions.BaseAction;/** * @author Goliath * */@Controller@RemoteProxypublic class TestAction extends BaseAction {public TestAction() {// TODO Auto-generated constructor stub}/*** @date:2010-2-1* @author:Goliath* @return*/@RemoteMethodpublic String testDwr(){return "test success";}}


就采用DispatcherServlet方法来说去掉了XXX-servlet.xml,也可以用project/dwr来测试dwr

热点排行