Java 调用一个服务激活器和另一个服务激活器

Java 调用一个服务激活器和另一个服务激活器,java,spring,spring-integration,Java,Spring,Spring Integration,我对Spring集成流有疑问。我们可以一个接一个地调用int:service-activator吗。考虑下面的例子。 <int:channel id="getPresciption" /> <int:channel id="respPrescription" /> <int-http:inbound-gateway request-channel="getPresciption" reply-channel="respPrescription

我对Spring集成流有疑问。我们可以一个接一个地调用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>   

我的问题是我们能做到这一点。
或者我们必须使用聚合器。

您需要另一个频道

<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>   

您需要另一个频道

<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>   


意味着我们可以在另一个service activator之后调用service activator。对-第一个service activator的输出被发送到第二个service activator。我尝试了使用此方法。但是在使用这个之后,当我点击这个url时,我发现下面有一个异常;您在
getPrescription
上没有订户。您的第一个服务具有相同的输入和输出通道
resp
。输入通道应为
GetPrescription
。谢谢。还有一个问题,我们如何在网关接口中拥有多个方法。我的意思是,我们可以拥有它,但是如果我们有多个方法,我们如何映射它意味着我们可以在另一个服务激活器之后调用服务激活器。对-第一个服务激活器的输出被发送到第二个服务激活器。我试着使用这个。但是在使用这个之后,当我点击这个url时,我发现下面有一个异常;您在
getPrescription
上没有订户。您的第一个服务具有相同的输入和输出通道
resp
。输入通道应为
GetPrescription
。谢谢。还有一个问题,我们如何在网关接口中拥有多个方法。我的意思是,我们可以拥有它,但是如果我们有超过1种方法,我们如何映射它呢