SpringSide团队日志

Spring2.0RC2对动态语言集成的升级

作者 calvin 目标文章 项目日志 - 2006-07-25

新增了一个<lang>的schema, webservice-client.xml 已改为

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xmlns:lang="http://www.springframework.org/schema/lang"
  4. xsi:schemaLocation="
  5. http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
  6. 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变量注入。



    发表评论








     authimage