【问题标题】:Https support for <int-http:outbound-gateway><int-http:outbound-gateway> 的 HTTPS 支持
【发布时间】:2015-02-25 15:04:53
【问题描述】:

我需要为 &lt;int-http:outbound-gateway&gt; 实现 https 支持。

以下是场景:

&lt;int-http:inbound-gateway&gt; 接受 Spring 集成的入站 URL。 &lt;int-http:inbound-gateway&gt;&lt;int-http:outbound-gateway&gt;的回复通道相同。根据 HeaderValueRouter 将入站请求从&lt;int-http:inbound-gateway&gt; 的请求通道转发到&lt;int-http:inbound-gateway&gt; 的请求通道。现在从出站 url 收到响应并放入回复通道。 &lt;int-http:outbound-gateway&gt; 的 url-expression 是从 MessageHeader "http_requestUrl" 属性构建的。

现在,如果我在 https 中托管外部应用程序。我需要在&lt;int-http:inbound-gateway&gt; 中进行什么配置才能在回复通道中获得响应

【问题讨论】:

    标签: spring spring-integration


    【解决方案1】:

    实际上与 Spring Integration for SSL 无关。这是底层 HTTP 引擎的职责。而且,说实话,它甚至不依赖于RestTemplateClientHttpRequestFactory 实现。

    您只需要拥有服务器 SSL 证书并将其放置到 trustStore。也就是说,如果您的目标服务只需要信任 - 单向 SSL。

    如果您需要mutual SSL,您需要为您的Java 生成密钥并将其存储在keyStore 中,并与服务器共享公共部分-证书。

    您可以在 Java SSL 文档中找到更多信息。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-10-27
      • 2018-10-11
      • 1970-01-01
      • 2017-02-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多