Class HvlLogSearchElasticsearchConfiguration

java.lang.Object
tr.com.havelsan.javarch.configuration.HvlBaseConfiguration
tr.com.havelsan.javarch.log.search.starter.elasticsearch.configuration.HvlLogSearchElasticsearchConfiguration

@Configuration @Profile("elasticsearch") @ComponentScan(basePackages="tr.com.havelsan.javarch.log.search.starter.elasticsearch") public class HvlLogSearchElasticsearchConfiguration extends tr.com.havelsan.javarch.configuration.HvlBaseConfiguration
Configuration for Log ElasticSearch.
  • Constructor Details

    • HvlLogSearchElasticsearchConfiguration

      public HvlLogSearchElasticsearchConfiguration()
  • Method Details

    • elasticsearchClient

      @Bean public org.elasticsearch.client.RestHighLevelClient elasticsearchClient(org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchProperties elasticsearchProperties, HvlLogSearchElasticsearchSSLProperties logSearchElasticsearchSSLProperties) throws CertificateException, KeyStoreException, IOException, NoSuchAlgorithmException, KeyManagementException
      Client rest high level client.
      Parameters:
      elasticsearchProperties - the elasticsearch properties
      logSearchElasticsearchSSLProperties - the log search elasticsearch ssl properties
      Returns:
      the rest high level client
      Throws:
      CertificateException - the certificate exception
      KeyStoreException - the key store exception
      IOException - the io exception
      NoSuchAlgorithmException - the no such algorithm exception
      KeyManagementException - the key management exception
    • elasticsearchTemplate

      @Primary @Bean public org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate elasticsearchTemplate(org.elasticsearch.client.RestHighLevelClient restHighLevelClient) throws IOException
      Elasticsearch template elasticsearch rest template.
      Parameters:
      restHighLevelClient - the rest high level client
      Returns:
      the elasticsearch rest template
      Throws:
      IOException - the io exception