JAVA-31341 Fix spring-jooq and spring-mybatis module (#15897)

This commit is contained in:
anuragkumawat
2024-02-20 19:58:46 +05:30
committed by GitHub
parent c77c0deea5
commit acb28bdec3
9 changed files with 26 additions and 21 deletions
@@ -27,7 +27,7 @@ public class SecureRestTemplateConfig {
this.sslContext = sslBundle.createSslContext();
}
@Bean
@Bean(name="secureRestTemplate")
public RestTemplate secureRestTemplate() {
final SSLConnectionSocketFactory sslSocketFactory = SSLConnectionSocketFactoryBuilder.create().setSslContext(this.sslContext).build();
final HttpClientConnectionManager cm = PoolingHttpClientConnectionManagerBuilder.create().setSSLSocketFactory(sslSocketFactory).build();
@@ -1,6 +1,7 @@
package com.baeldung.springbootsslbundles;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
@@ -11,7 +12,7 @@ public class SecureServiceRestApi {
private final RestTemplate restTemplate;
@Autowired
public SecureServiceRestApi(RestTemplate restTemplate) {
public SecureServiceRestApi(@Qualifier("secureRestTemplate") RestTemplate restTemplate) {
this.restTemplate = restTemplate;
}