GDS 的Tide配置(使用spring)

来源:互联网 发布:手机扫描搜索不到网络 编辑:程序博客网 时间:2024/05/21 07:49

1 在应用的preinitialize 方法中调用 Spring.getInstance().initApplication()

2 对于服务的配置,不一定非要设置services-config.xml文件,可以

Spring.getInstance().addComponent("serviceInitializer", DefaultServiceInitializer,             { contextRoot: "/my-app" });
3 Context ,他是tide框架的核心部分,他是服务端上下文在客户端的展现。
Context for Spring
import org.granite.tide.spring.Context;var tideContext:Context = Spring.getInstance().getSpringContext();
4 然后服务器组件可以通过Context 来访问,比如 
  tideContext.helloWorld.sayHello("Jimi", helloResult, helloFault);
 helloResult是返回处理结果,helloFault是错误处理,Jimi是方法传递参数