diff --git a/admin/kernel-masterdata-service/src/main/java/io/mosip/kernel/masterdata/config/AddressConfiguration.java b/admin/kernel-masterdata-service/src/main/java/io/mosip/kernel/masterdata/config/AddressConfiguration.java index 8118a206ae8..52306194ebe 100644 --- a/admin/kernel-masterdata-service/src/main/java/io/mosip/kernel/masterdata/config/AddressConfiguration.java +++ b/admin/kernel-masterdata-service/src/main/java/io/mosip/kernel/masterdata/config/AddressConfiguration.java @@ -43,29 +43,6 @@ public class AddressConfiguration { @Value("#{T(java.util.Arrays).asList('${mosip.location.search.file.name:}')}") private List droolsRuleFileName; - @Bean - public RestTemplate restTemplate() - throws KeyStoreException, KeyManagementException, NoSuchAlgorithmException { - TrustStrategy acceptingTrustStrategy = (X509Certificate[] chain, String authType) -> true; - - SSLContext sslContext = org.apache.http.ssl.SSLContexts.custom() - .loadTrustMaterial(null, acceptingTrustStrategy) - .build(); - - SSLConnectionSocketFactory csf = new SSLConnectionSocketFactory(sslContext); - - CloseableHttpClient httpClient = HttpClients.custom() - .setSSLSocketFactory(csf) - .build(); - - HttpComponentsClientHttpRequestFactory requestFactory = - new HttpComponentsClientHttpRequestFactory(); - - requestFactory.setHttpClient(httpClient); - RestTemplate restTemplate = new RestTemplate(requestFactory); - return restTemplate; - } - @Bean public KieSession kieSession() throws IOException { LOGGER.info("Session created...");