Skip to content

Commit

Permalink
Latest address search drools engine API
Browse files Browse the repository at this point in the history
Signed-off-by: Monobikash Das <[email protected]>
  • Loading branch information
Monobikash Das authored and Monobikash Das committed Jan 29, 2024
1 parent 669700c commit 71839d1
Showing 1 changed file with 0 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,29 +43,6 @@ public class AddressConfiguration {
@Value("#{T(java.util.Arrays).asList('${mosip.location.search.file.name:}')}")
private List<String> 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...");
Expand Down

0 comments on commit 71839d1

Please sign in to comment.