0

Spring 3 を使用して Web プラットフォームを作成し、Flex 4 を使用して特定のクライアント側アプリケーションを作成するプロジェクトに取り組んでいます。現在、Spring プロジェクトを Flex と統合する必要があります。

Spring-Flex 統合ライブラリ バージョンを使用しています: 1.5.0.M2

以前の質問を確認しましたが、これらのエントリで定義されている統合構成は、通常、以前のバージョンの BlazeDS および Spring 用です。そして、私が理解しているように、いくつかの違いがあるかもしれません。

web.xml および必要なその他の xml ファイルで構成を行う方法と、フォルダー構造がどのようになるかを誰かに教えてもらえますか。最新のチュートリアルのリンクは大歓迎です。

私たちのビジネス要件は次のとおりです。

2 つのサーブレットが存在する必要があります: 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);
    }

}

よろしく、

ウグル

4

1 に答える 1

0

私のFlex 4、Hibernate 3、および Spring 3 Integration 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>

それはあなたが始めるのに十分なはずです.

于 2011-05-11T11:13:31.503 に答える