я нашел в каком-то моем старом проекте этот конфиг:
<bean id="clientHttpRequestFactory" class="org.springframework.http.client.CommonsClientHttpRequestFactory"/>
<!--TODO waiting HttpClient SSL impl <bean id="clientHttpRequestFactory" class="org.springframework.http.client.HttpComponentsClientHttpRequestFactory"/>-->
И я помню, что такого рода CommonsClientHttpRequestFactory
для commons-http-client-3.0
позволяет принимать все сертификаты сервера. В противном случае вы должны настроить HttpComponentsClientHttpRequestFactory
для commons-http-client-4.x
, как это:
CloseableHttpClient httpClient = HttpClients.custom().setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE).build()
Смотреть подробнее в этом ответе: How to ignore SSL certificate errors in Apache HttpClient 4.0.
После этой настройки вам следует просто ввести clientHttpRequestFactory
в <int-http:outbound-gateway>
.
Мой пример выглядит следующим образом: INT-клиента: исходящий шлюз> <боб ID =" завод " \t class =" org.springframework.http.client.HttpComponentsClientHttpRequestFactory "> \t \t <Свойство Имя = значение "ReadTimeOut" = "10000" /> –
@Artem Как я провода CloseableHttpClient в моем SpringXML и установить SSLContext, пожалуйста, см мой вопрос здесь .. http://stackoverflow.com/questions/34242723/allowallhostnameverifier-in-spring-integration-xml –