Interface 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 restClientrestClient= restClientBuilder.apply(ssl.fromBundle("mybundle")).build();
return new MyBean(webClient);
}
NOTE: Apply SSL configuration will replace any previously
configured ClientHttpRequestFactory.
If you need to configure ClientHttpRequestFactory with more than just SSL
consider using a ClientHttpRequestFactorySettings with
ClientHttpRequestFactories.- Since:
- 3.2.0
- Author:
- Phillip Webb
-
Method Summary
Modifier and TypeMethodDescriptionfromBundle(String bundleName) Return aConsumerthat will apply SSL configuration for the namedSslBundleto aRestClient.Builder.fromBundle(SslBundle bundle)
-
Method Details
-
fromBundle
Return aConsumerthat will apply SSL configuration for the namedSslBundleto aRestClient.Builder.- Parameters:
bundleName- the name of the SSL bundle to apply- Returns:
- a
Consumerto apply the configuration - Throws:
NoSuchSslBundleException- if a bundle with the provided name does not exist
-
fromBundle
- Parameters:
bundle- the SSL bundle to apply- Returns:
- a
Consumerto apply the configuration
-