Flex + spring + hibernate环境搭建
?
工具准备:
Eclipse:?http://www.eclipse.org/downloads/packages/release/galileo/sr2
Flash Builder Plugin:?http://adobe.com/go/try_flashbuilder
Download BlazeDS:?https://www.adobe.com/cfusion/entitlement/index.cfm?e=lc_blazeds
blazeds 入门练习:
http://mdzyuba.blogspot.com/2008/02/deploying-blazeds-to-weblogic-100.html
?
Spring BlazeDS Integration:?http://s3.amazonaws.com/dist.springframework.org/release/FLEX/spring-flex-1.0.3.RELEASE-with-dependencies.zip
?
flex +blazeds
?
step1. 新建一个dynamic web project "blazeds"--> new tomcat server 。
step2. 右键点击import blazeds.war ,import会修改我们的web.xml文件加入blazeds的一些servlet ->MessageBrokerServlet 同时会加载blazeds的配置文件。
?
step3. 在server端新建service类com.blazeds.HelloService.java
step4. 在WEB-INF/flex/remote-config.xml里注册你的service-->?com.blazeds.HelloService.java
<destination id="sayHello">
<properties>
<source>com.blazeds.HelloService</source>
<!--<scope>application</scope>-->
</properties>
</destination>
?
step5. new a flex project "client"--> new a applicaton?
?
<?xml version="1.0" encoding="utf-8"?><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"><fx:Script><![CDATA[protected function button1_clickHandler(event:MouseEvent):void{remote.sayHello(input.text.toString());}]]></fx:Script><fx:Declarations><!-- Place non-visual elements (e.g., services, value objects) here --><s:RemoteObject id="remote" destination="sayHello" /></fx:Declarations><s:VGroup><s:Label id="showText" text="{remote.sayHello.lastResult}"/><s:TextInput id="input" /><s:Button click="button1_clickHandler(event)" label="say" /></s:VGroup></s:Application>?
?
step6. 右击 client --> properties -->flex server 做一些配置
? ? ? ? ?root folder : C:\tomcat\wtpwebapps\blazeds
? ? ? ? ?root url : http://localhost:8400/blazeds
? ? ? ? ?context root : /blazeds 点击 apply --> run?
这时你会看到你的tomcat的相应的目录下多了一个文件夹,好了,现在可以运行你的flex应用了。
?
streaming channelhttp://jonsion.iteye.com/blog/854317
?
Flex + spring?
?
?
?
Flex + spring + hibernate
?
?