Spring 3,Flex 4与SpringFlex 1.5.0.M2 api +配置集成

| 我们正在一个项目中,我们将使用Spring 3创建一个Web平台,并使用Flex 4创建一个特定的客户端应用程序。当前,我们需要将Spring项目与Flex集成。 我们正在使用Spring-Flex集成库版本:1.5.0.M2 我检查了较早的问题,但是在这些条目中定义的集成配置通常是针对BlazeDS和Spring的早期版本的。而且据我了解,可能会有一些差异。 有人可以告诉我如何在web.xml和所需的任何其他xml文件中进行配置,以及文件夹结构如何。任何最新的教程链接将不胜感激。 我们的业务要求是: 应该存在两个servlet:1)具有映射/.html的projectServlet                            2)具有映射/ messageBroker /的flexServlet 我们可以在Flex端使用的服务类如下:
package com.ecognitio.service;

import org.springframework.flex.remoting.RemotingDestination;
import org.springframework.flex.remoting.RemotingInclude;
import org.springframework.stereotype.Service;


@Service
@RemotingDestination
public class Foo {

    @RemotingInclude
    public void sayHello(String name){
        System.out.println(\"Hello: \"+name);
    }

}
问候, 乌古尔     
已邀请:
我的Flex 4,Hibernate 3和Spring 3集成Refcard逐步完成了所有设置过程,并且可以在1.5.0.M2上正常工作(假设您已经在Spring配置文件中更改了名称空间)。但是这是一个基本的web.xml示例:
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<web-app xmlns=\"http://java.sun.com/xml/ns/j2ee\"
  xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
  xsi:schemaLocation=\"http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns
/j2ee/web-app_2_4.xsd\"
  version=\"2.4\">

  <display-name>Project Template</display-name>

  <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</liste
ner-class>
  </listener>

  <listener>
    <listener-class>flex.messaging.HttpFlexSession</listener-class>
  </listener>

  <servlet>
    <servlet-name>flex</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <init-param>
      <param-name>contextConfigLocation</param-name>
      <param-value></param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>

  <servlet-mapping>
    <servlet-name>flex</servlet-name>
    <url-pattern>/messagebroker/*</url-pattern>
  </servlet-mapping>

</web-app>
那应该足以让您入门。     

要回复问题请先登录注册