Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 3619

How do I configure my .crt file content in Application.yml?

$
0
0

I have configured my certificate content in my application.yml file

spring:  ssl:    bundle:      my-bundle:        pem:          client:            truststore:              certificate: -----BEGIN CERTIFICATE----- ....

But WebClientSsl cannot pick up the bundle name.

NoSuchSslBundleException: SSL bundle name 'my-bundle' cannot be found

I am trying to apply the certificate to my webclient

@Configurationpublic class WebClientConfiguration { private final WebClientSsl webClientSsl;    public WebClientConfiguration(WebClientSsl webClientSsl) {        this.webClientSsl = webClientSsl;    }@Bean    public WebClient myWebClient() {        return WebClient.builder()                .apply(webClientSsl.fromBundle("my-bundle"))                .baseUrl("**.com")                .build();            }}

Viewing all articles
Browse latest Browse all 3619

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>