---
title: "Spring-Flex架构分析"
author: "neatchenheng"
date: "2010-03-19T15:07:43Z"
tags: []
categories: ["企业架构"]
slug: "spring-flex"
draft: false
lastmod: "2010-03-19T15:07:43Z"
id: 619847
url: "https://itshenry.iteye.com/blog/619847"
---

Spring-Flex是Spring和Adobe共同研发的一个开源项目，她整合了Spring的优秀特性和

BlaseDS的工作机制，使用Spring也可以很好的应用在RIA应用程序开发中。

     （一）回顾BlazeDS

      参见[BlazeDS架构分析](/blog/618258)

 

     （二）Spring-Flex整合后的服务端工作原理图

          ![spring-flex](http://dl.iteye.com/upload/attachment/220696/cc63f523-c3e9-3b32-9d5b-7462d5140be7.jpg)

 

（1）几个重要的标签：

1、&lt;flex:message-broker/&gt;

使用此标签，将会自己建立SimpleUrlHandlerMapping，MessageBrokerHandlerAdapter， MessageBrokerFactoryBean，而不再需要在spring配制文件中显示的写出来。

2、&lt;flex:remotion-destionation/&gt;

暴露运程服务，支持如下属性：channels,destionation-id,exclude-methods,include- methods,message-broker,service-adapter.

3、使用注解：

@Service(”productService”)

@RemotingDestination(channels={”my-amf”,”my-secure-amf”})

4、&lt;flex:message-destionation/&gt;及其它服务标签

不同服务性质采用不同的标签，这里不在分析。

（2）安全机制

正在学习中。

 

     （三）使用Spring-flex

Spring应用的写方没有变化，这里附主要的配制文件：

web.xml,services-config.xml,flex-servlet.xml,log4j.properties