接口 RestClientSsl
public interface RestClientSsl
Interface that can be used to
apply
SSL configuration
to a RestClient.Builder
.
Typically used as follows:
@Bean public MyBean myBean(RestClient.Builder restClientBuilder, RestClientSsl ssl) { RestClient restClient = restClientBuilder.apply(ssl.fromBundle("mybundle")).build(); return new MyBean(restClient); }NOTE: Apply SSL configuration will replace any previously
configured
ClientHttpRequestFactory
.
If you need to configure ClientHttpRequestFactory
with more than just SSL
consider using a ClientHttpRequestFactoryBuilder
.- 从以下版本开始:
- 3.2.0
- 作者:
- Phillip Webb
-
方法概要
修饰符和类型方法说明fromBundle
(String bundleName) Return aConsumer
that will apply SSL configuration for the namedSslBundle
to aRestClient.Builder
.fromBundle
(SslBundle bundle)
-
方法详细资料
-
fromBundle
Return aConsumer
that will apply SSL configuration for the namedSslBundle
to aRestClient.Builder
.- 参数:
bundleName
- the name of the SSL bundle to apply- 返回:
- a
Consumer
to apply the configuration - 抛出:
NoSuchSslBundleException
- if a bundle with the provided name does not exist
-
fromBundle
- 参数:
bundle
- the SSL bundle to apply- 返回:
- a
Consumer
to apply the configuration
-