Interface WebClientSsl
public interface WebClientSsl
Interface that can be used to
apply
SSL configuration
to a WebClient.Builder
.
Typically used as follows:
@Bean public MyBean myBean(WebClient.Builder webClientBuilder, WebClientSsl ssl) { WebClient webClient = webClientBuilder.apply(ssl.forBundle("mybundle")).build(); return new MyBean(webClient); }NOTE: Apply SSL configuration will replace any previously
configured
ClientHttpConnector
.- Since:
- 3.1.0
-
Method Summary
Modifier and TypeMethodDescriptionConsumer<org.springframework.web.reactive.function.client.WebClient.Builder>
fromBundle
(String bundleName) Consumer<org.springframework.web.reactive.function.client.WebClient.Builder>
fromBundle
(org.springframework.boot.ssl.SslBundle bundle)
-
Method Details
-
fromBundle
Consumer<org.springframework.web.reactive.function.client.WebClient.Builder> fromBundle(String bundleName) throws org.springframework.boot.ssl.NoSuchSslBundleException - Parameters:
bundleName
- the name of the SSL bundle to apply- Returns:
- a
Consumer
to apply the configuration - Throws:
org.springframework.boot.ssl.NoSuchSslBundleException
- if a bundle with the provided name does not exist
-
fromBundle
Consumer<org.springframework.web.reactive.function.client.WebClient.Builder> fromBundle(org.springframework.boot.ssl.SslBundle bundle) - Parameters:
bundle
- the SSL bundle to apply- Returns:
- a
Consumer
to apply the configuration
-