私は最近、Spring Integration 4.1.3から4.2.6にアップデートし、http:inbound-gateway
から500応答を取得し始めたことに気付きました。調査の際 これは空の応答によるものであったとMessagingGatewaySupportSpringインテグレーションhttp:inbound-channel-adapterエラーチャネル
if (reply == null && this.errorOnTimeout) {
これを解釈するゲートウェイは、これは理にかなっているので、私はhttp:inbound-channel-adapter
にこれを変更し、それがこの問題を解決したが、その後エラー処理」はdoesnの期待どおりに動作しません。
私は、以前
<int-http:inbound-gateway id="inboundGateway" request-channel="httpInChannel" reply-channel="httpResponseChannel" path="/**/status*" supported-methods="POST" error-channel="httpErrorChannel"/>
<int:chain input-channel="httpInChannel" output-channel="serviceChannel">
...
</int:chain>
<int:chain input-channel="httpErrorChannel">
<int:header-enricher>
<int:header name="http_statusCode" value="500" />
</int:header-enricher>
<int:transformer expression="payload.localizedMessage" />
</int:chain>
<int:service-activator input-channel="serviceChannel" ref="someController" method="someVoidMethod"/>
としていたし、ゲートウェイ上の誤りチャンネル私はそれが動作しないことが疑われるが、私は今、それは通常、有効なために正常に動作します
<int-http:inbound-channel-adapter id="inboundAdapter" channel="httpInChannel" path="/**/status*" supported-methods="POST" error-channel="httpErrorChannel"/>
<int:chain input-channel="httpInChannel" output-channel="serviceChannel">
...
</int:chain>
<int:chain input-channel="httpErrorChannel">
<int:header-enricher>
<int:header name="http_statusCode" value="500" />
</int:header-enricher>
<int:transformer expression="payload.localizedMessage" />
</int:chain>
<int:service-activator input-channel="serviceChannel" ref="someController" method="someVoidMethod"/>
にわずかにこれを修正私は無効なメッセージを送信する場合、私は応答で完全なエラースタックと500の応答を取得する(ヘッダーの豊富な状態コードも変更しようとしました)。エラーは、(それがドキュメントのいずれかhttp://docs.spring.io/spring-integration/docs/4.3.0.RELEASE/reference/htmlsingle/#http-response-statuscodeでないが)error-channel
出力を持たないように理にかなって
org.springframework.messaging.core.DestinationResolutionException: no output-channel or replyChannel header available
あります。 インバウンドアダプタのエラー応答をゲートウェイと同様の方法で変更する方法はありますか?