具體過程參見:http://coenraets.org/flex-spring/
簡要描述一下:
1、首先要繼承FlexFactory,實現Spring與Flex的集成,上文中已經提供了具體實現,下載即可。
2、在web.xml中配置Spring,如下:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
3、在service-config.xml配置文件中添加
<factories>
<factory id="spring" class="flex.samples.factories.SpringFactory"/>
</factories>
4、修改remote-config.xml中原有的destination配置,原為:
<properties>
<source>com.bluesky.flexpsp.PsPDataService</source>
</properties>
修改為:
<properties>
<factory>spring</factory><!-- spring為第三步中的factoryID-->
<source>pspDataService</source><!-- pspDataService為bean的id -->
</properties>
posted on 2008-08-09 23:58
The Matrix 閱讀(845)
評論(0) 編輯 收藏 所屬分類:
Flex