网管联盟 | 网管论坛 | 网管u家 | 网管博客 | 网管软件 | 网管求职 | 小游戏 | 网管搜索 | 网管原创 | 网管聚合 | 网管读摘 | 网管焦点 | 世界素材 | 会员投稿 | 会员中心 
中国网管联盟
Windows Linux Cisco 网络技术 数据库 黑客攻防 DotNet Java PHP 认证 新闻资讯 服务器 存储资讯 网络设备 网管学堂 技术专题 焦点 网吧频道
 当前位置: > bitsCN.com > JAVA > 开源技术 > Spring > 在Spring 2中整合DWR 2  

在Spring 2中整合DWR 2

2008-07-10  作者:bitsCN整理  来源:中国网管联盟  点评 投稿 收藏

欢迎进入Java社区论坛,与200万技术人员互动交流 >>进入

    前些日子看了一篇关于在Spring 2中整合DWR 2的文章《AJAX, DWR and Spring》。最近,想动手试一下,就下载其源代码回来看看,依葫芦画瓢做了一遍。在运行时,得到XML验证错误。经过一翻折腾,终于把问题解决。

网管联盟bitsCN_com

    Spring 2基于XML Schema的配置
    众所周知,Spring 2通过XML Schema配置方式极大地简化的其配置,而且使得第三方扩展变为可能。配置如下代码所示: 网管bitscn_com

    <? xml version="1.0" encoding="UTF-8" ?>

网管u家u.bitscn@com

     < beans xmlns =http://www.springframework.org/schema/beans 网管联盟bitsCN_com

         xmlns:xsi =http://www.w3.org/2001/XMLSchema-instance 网管bitscn_com

         xsi:schemaLocation ="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd" >

网管bitscn_com

                  <!-- <bean /> definitions here -->

中国网管论坛bbs.bitsCN.com

          </ beans >
    清单1 applicationContext.xml
    不知大家有没有想过spring-beans-2.0.xsd位置在那里?其实,大家可以用Eclipse打开Spring的jar包,展开META-INF,并双击打开其中的spring.schemas文件,内容如下:

中国网管联盟bitsCN.com

    http\://www.springframework.org/schema/beans/spring-beans- 2.0 .xsd = org/springframework/beans/factory/xml/spring-beans- 2.0 .xsd 网管联盟bitsCN@com

     http\://www.springframework.org/schema/tool/spring-tool- 2.0 .xsd = org/springframework/beans/factory/xml/spring-tool- 2.0 .xsd 中国网管论坛bbs.bitsCN.com

     http\://www.springframework.org/schema/util/spring-util- 2.0 .xsd = org/springframework/beans/factory/xml/spring-util- 2.0 .xsd 网管网www.bitscn.com

     http\://www.springframework.org/schema/aop/spring-aop- 2.0 .xsd = org/springframework/aop/config/spring-aop- 2.0 .xsd 网管u家u.bitscn@com

     http\://www.springframework.org/schema/lang/spring-lang- 2.0 .xsd = org/springframework/scripting/config/spring-lang- 2.0 .xsd

网管下载dl.bitscn.com

     http\://www.springframework.org/schema/tx/spring-tx- 2.0 .xsd = org/springframework/transaction/config/spring-tx- 2.0 .xsd 网管论坛bbs_bitsCN_com

     http\://www.springframework.org/schema/jee/spring-jee- 2.0 .xsd = org/springframework/ejb/config/spring-jee- 2.0 .xsd 网管论坛bbs_bitsCN_com

     http\://www.springframework.org/schema/beans/spring-beans.xsd = org/springframework/beans/factory/xml/spring-beans- 2.0 .xsd 网管bitscn_com

     http\://www.springframework.org/schema/tool/spring-tool.xsd = org/springframework/beans/factory/xml/spring-tool- 2.0 .xsd 网管u家u.bitscn@com

     http\://www.springframework.org/schema/util/spring-util.xsd = org/springframework/beans/factory/xml/spring-util- 2.0 .xsd

网管下载dl.bitscn.com

     http\://www.springframework.org/schema/aop/spring-aop.xsd = org/springframework/aop/config/spring-aop- 2.0 .xsd

中国网管论坛bbs.bitsCN.com

     http\://www.springframework.org/schema/lang/spring-lang.xsd = org/springframework/scripting/config/spring-lang- 2.0 .xsd

中国网管论坛bbs.bitsCN.com

     http\://www.springframework.org/schema/tx/spring-tx.xsd = org/springframework/transaction/config/spring-tx- 2.0 .xsd 网管u家u.bitsCN.com

     http\://www.springframework.org/schema/jee/spring-jee.xsd = org/springframework/ejb/config/spring-jee- 2.0 .xsd
网管u家u.bitsCN.com

网管u家u.bitsCN.com


TAGs
 上一篇:Spring配C3P0连接池   下一篇:深入探讨Spring与Struts 的集成方案
在Spring 2中整合DWR 2 评论:
loading.. 评论加载中…
评论:请自觉遵守互联网相关政策法规,评论不得超过250字。

验证码: 注册用户
本类热门排行:
最新推荐文章:
网管论坛交流: