与出站网关的HTTPS通信
Spring集成4: 我想与HTTPS的http出站网关进行通信。i、 e.使用安全协议。与出站网关的HTTPS通信,https,spring-integration,outbound,Https,Spring Integration,Outbound,Spring集成4: 我想与HTTPS的http出站网关进行通信。i、 e.使用安全协议。 要求是我想使用URL“https://”,但我们没有证书,需要绕过此设置。我在一些旧项目中发现此配置: <bean id="clientHttpRequestFactory" class="org.springframework.http.client.CommonsClientHttpRequestFactory"/> <!--TODO waiting HttpClient SSL i
要求是我想使用URL“https://”,但我们没有证书,需要绕过此设置。我在一些旧项目中发现此配置:
<bean id="clientHttpRequestFactory" class="org.springframework.http.client.CommonsClientHttpRequestFactory"/>
<!--TODO waiting HttpClient SSL impl <bean id="clientHttpRequestFactory" class="org.springframework.http.client.HttpComponentsClientHttpRequestFactory"/>-->
请参阅此答案中的更多信息:
在定制之后,您只需将
clienthttpprequestfactory
注入我的示例如下:@Artem如何在SpringXML中连接CloseableHttpClient并设置SSLContext,请参见我的问题。。
CloseableHttpClient httpClient = HttpClients.custom().setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE).build()