Spring2.0RC2对动态语言集成的升级
新增了一个<lang>的schema, webservice-client.xml 已改为
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:lang="http://www.springframework.org/schema/lang" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang.xsd"> <!--Groovy版本的Web Service Client--> <lang:groovy id="BookServiceClient" refresh-check-delay="60000" script-source="classpath:org/springside/bookstore/plugins/xfire/service/BookServiceClient.groovy"> <lang:property name="serviceUrl" value="http://localhost:8080/springside/service/BookService"/> </lang:groovy> </beans>
第一个属性 refresh-check-delay,每隔一段时间扫描一次脚本的变化,reload it。
第二个属性script-source 指向scriptsouce, <lang:property>演绎了Spring最喜爱的IOC,将serviceUr变量注入。
静态链接网址 /
(0) 最新回复 /
(0) 引用
发表评论