Я настроил содержимое сертификата в файле application.yml
spring:
ssl:
bundle:
my-bundle:
pem:
client:
truststore:
certificate: -----BEGIN CERTIFICATE----- ....
Но WebClientSsl не может получить имя пакета.
NoSuchSslBundleException: имя пакета SSL «my-bundle» не найдено
Я пытаюсь применить сертификат к своему веб-клиенту
@Configuration
public 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();
}
}
Подробнее здесь: https://stackoverflow.com/questions/786 ... cation-yml