1
我試圖把HTTP:出站網關成鏈,但在運行時遇到異常,我知道我可以把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'.
,但是當我刪除屬性的要求,通道', 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>