我对Spring Integration Flow有疑问。我们可以将int:service-activator称为另一个。考虑下面的示例。
<int:channel id="getPresciption" />
<int:channel id="respPrescription" />
<int-http:inbound-gateway
request-channel="getPresciption" reply-channel="respPrescription"
supported-methods="GET" path="/getAllPresciption">
<int-http:request-mapping
consumes="application/json" produces="application/json" />
</int-http:inbound-gateway>
<int:service-activator
ref="medicineServiceActivator" method="buildPrescription"
input-channel="respPrescription" output-channel="respPrescription" />
<int:service-activator
ref="medicineServiceActivator" method="storePrescription"
input-channel="respPrescription"></int:service-activator>
我的问题是我们能做到吗? 否则我们必须使用Aggregator。
答案 0 :(得分:2)
您需要另一个频道
<int:service-activator
ref="medicineServiceActivator" method="buildPrescription"
input-channel="respPrescription" output-channel="toStorePrescription" />
<int:service-activator
ref="medicineServiceActivator" method="storePrescription"
input-channel="toStorePrescription"></int:service-activator>