DWR+SpringMVC integration

http://directwebremoting.org/dwr/documentation/server/integration/spring.html

http://www.butterdev.com/dwr/2009/12/dwr-3-x-and-spring/

December 6, 2009

DWR 3.x and Spring

If you want to integrate DWR 3.x with Spring you can follow my previous posts (note – I have included a working sample application and updated source at the bottom of this page):
1.I am using DWR 2.0.x, Spring 2.x, and Spring MVC
2.I am using DWR 2.0.x, Spring 2.x, but I am not using Spring MVC

However, you will need to make the following changes.

Spring 2.5 or greater is Required

You must upgrade to Spring 2.5 or higher (I am using Spring 3.0.4).

Update you Spring Application Context

Update your Spring Application Context:
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xmlns:dwr="http://www.directwebremoting.org/schema/spring-dwr"
    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-.0.xsd

http://www.springframework.org/schema/aop

http://www.springframework.org/schema/aop/spring-aop-3.0.xsd

http://www.directwebremoting.org/schema/spring-dwr

    http://www.directwebremoting.org/schema/spring-dwr-3.0.xsd">
I have added two working examples (~10 mb in size), both of these zip files contain all source as well as a working web-app that you can drop into your container:
•DWR 3.x, Spring 3.x using Spring MVC
•DWR 3.x, Spring 3.x, without Spring MVC

你可能感兴趣的:(integration)