2017-08-22 7 views
1

は、私は、http配置しよう:チェーンへのアウトバウンド・ゲートウェイを、しかし、実行時に例外に会った、私はチェーンHTTPアウトバウンドゲートウェイをチェーン化することは可能ですか?

Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: The 'request-channel' attribute isn't allowed for a nested (e.g. inside a <chain/>) endpoint element: 'http:outbound-gateway'. 

へのHTTPアウトバウンドゲートウェイを置くことができます知っているかもしれないが、私は属性の要求チャンネル」を削除する場合、 IDEはこれが必須の属性だと教えてくれました。ここ

は私の設定です:

<int:chain input-channel="requestChannel" 
      output-channel="requestChannel2"> 
    <http:outbound-gateway request-channel="requestChannel2" expected-response-type="java.lang.String" 
          url="http://localhost:8080/postService/postwithparm" 
          http-method="POST" 
          extract-request-payload="true"> 
    </http:outbound-gateway> 
</int:chain> 

答えて

1

request-channelは、そのゲートウェイの入力です。しかし、すでにチャンネルアダプタを配線するために、すでにこのコンポーネントであるチェーンは既に存在しており、私たち自身のチャンネルでそれを実現することはできません。

したがって、request-channelなしで行く方法は正しいです。あなたのIDEは適切な動作をサポートしていません。

関連する問題