b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

dwr好用吗_dwrutil.addrows_梅毒能治好吗(17)

电脑杂谈  发布时间:2017-01-08 07:05:46  来源:网络整理

2.确认你查看过开始指南中的内容。3.确认你的Spring的Bean在DWR外面运行良好。4.配置DWR和Spring一起工作。(看下面)5.查看演示页面::8080/[YOUR-WEBAPP]/dwr,检查spring的Bean是否出现。DWR对于Spring没有运行期依赖,所以如果你不使用Spring那么Spring的支持不会产生任何影响到。TheSpringCreator这个创造器会查找spring的中配置的Bean,用Spring去创建它们。如果你已经在使用Spring,那么这个创造器会非常有用。你可以通过下面的方式来创建远程调用的Bean:<allow>...<createcreator="spring"javascript="Fred"><paramname="beanName"value="Shiela"/></create></allow>寻找你的Spring配置有三种方式寻找配置文件:ContextLoaderListener最简单的方式是使用org.springframeworntext.ContextLoaderListener。

你不必使用所有的Spring-MVC功能,只需要这个Listener就够了,所以这是个不错的方案。你需要在WEB-INF/web.xml中做如下配置:<context-param><param-name>contextConfigLocation</param-name><param-value>/WEB-INF/classes/beans.xml</param-value></context-param><listener><listener-class>org.springframeworntext.ContextLoaderListener</listener-class></listener>我能找到的ContextLoaderListener的最好的文档就是javadoc。如果你知道还有更好的文档,请告知我。RobSanheim指出还有一个能深入了解ContextLoaderListener的文档。使用location*参数如果你要在dwr.xml中指定使用哪些bean,你可以使用location*参数。

你可以指定任意多个文件,只要参数以location开始并且唯一即可。例如:location-1,location-2。这些location被用做Spring的ClassPathXmlApplicationContext的参数:<allow>...<createcreator="spring"javascript="Fred"><paramname="beanName"value="Shiela"/><paramname="location"value="beans.xml"/></create></allow>直接设置BeanFactorySpringCreator有一个静态方法setOverrideBeanFactory(BeanFactory)用来通过编程的方式直接设置BeanFactory。配置DWR和SpringBramSmeets写了一个有意思的blog,教你配置DWR使用beans.xml代替WEB-INF/web.xml。


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-25046-17.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    • 刘政航
      刘政航

      就是容许这些女青年带着自己父母

    • 本阿弗莱克
      本阿弗莱克

      说明美国不愿面对岛礁的12海里内是中国的了

    • 赵立英
      赵立英

      这也是一种方法

    热点图片
    拼命载入中...