Spring integration Spring集成http:与Hystrix的出站网关

Spring integration Spring集成http:与Hystrix的出站网关,spring-integration,hystrix,spring-integration-http,Spring Integration,Hystrix,Spring Integration Http,是否有一种方法可以使用Hystrix命令包装http:outbound gateway REST API调用。我看到了一些关于使用自定义请求处理程序建议的参考,但不确定我将如何去做 请参见此处:。我不能以重复的形式结束你的问题,因为没有人投票支持我的答案。但仍然:相同的解决方案必须应用于您的用例: @ServiceActivator(inputChannel = "serviceChannel") @HystrixCommand(fallbackMethod = "serviceFallback

是否有一种方法可以使用Hystrix命令包装http:outbound gateway REST API调用。我看到了一些关于使用自定义请求处理程序建议的参考,但不确定我将如何去做

请参见此处:。我不能以重复的形式结束你的问题,因为没有人投票支持我的答案。但仍然:相同的解决方案必须应用于您的用例:

@ServiceActivator(inputChannel = "serviceChannel")
@HystrixCommand(fallbackMethod = "serviceFallback")
public String myService(String payload) {
    // Some external service call
}

public String serviceFallback(String payload) {
    // some fallback logic
}

另请参见我的sendbox中的示例:

请解释为什么您需要Hystrix,以及为什么您认为在http:Outbound的某个地方有类似于
的回退方法
,以便您可以应用Hystrix?