Java 使用Spring AMQP出站网关发送消息头

Java 使用Spring AMQP出站网关发送消息头,java,spring,web-services,spring-integration,Java,Spring,Web Services,Spring Integration,我使用SpringAMQP出站网关集成向第三方web服务发送请求。下面显示的是我的网关接口 public interface AccountManagerGateway { public RetrieveAccountResponse retrieveAccount(RetrieveAccountRequest request); } 我需要知道如何通过网关调用发送自定义消息头 Ex:- "AccountID" in the header 我做了一些谷歌搜索,但找不到解决方案。可能

我使用SpringAMQP出站网关集成向第三方web服务发送请求。下面显示的是我的网关接口

public interface AccountManagerGateway {

    public RetrieveAccountResponse retrieveAccount(RetrieveAccountRequest request);
}
我需要知道如何通过网关调用发送自定义消息头

Ex:- "AccountID" in the header
我做了一些谷歌搜索,但找不到解决方案。可能是我在一个错误的背景下或一个错误的方向上进行搜索。我期待你的支持

如果你需要更多信息,请告诉我。我没有在这里发布我的集成上下文xml,因为这样的话文章会很长

谢谢。

请参阅

例如:

public RetrieveAccountResponse retrieveAccount(RetrieveAccountRequest request,
               @Header("AccountId") String accountId);
默认情况下,用户定义的头不会通过AMQP发送,因此您需要在出站网关上配置
映射的请求头
;差不多

mapped-request-headers="STANDARD_REQUEST_HEADERS,AccountId"
请再次参阅