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 Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    co.elastic.clients.elasticsearch.ElasticsearchClient
    elasticsearchClient(co.elastic.clients.transport.rest_client.RestClientTransport restClientTransport)
    Client rest high level client.
    org.springframework.data.elasticsearch.client.elc.ElasticsearchTemplate
    elasticsearchTemplate(co.elastic.clients.elasticsearch.ElasticsearchClient elasticsearchClient)
    Elasticsearch template elasticsearch rest template.
    co.elastic.clients.transport.rest_client.RestClientTransport
    restClientTransport(org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchProperties elasticsearchProperties, HvlLogSearchElasticsearchSSLProperties logSearchElasticsearchSSLProperties)
    Rest client transport rest client transport.

    Methods inherited from class tr.com.havelsan.javarch.configuration.HvlBaseConfiguration

    info

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • HvlLogSearchElasticsearchConfiguration

      public HvlLogSearchElasticsearchConfiguration()
  • Method Details

    • restClientTransport

      @Bean @ConditionalOnMissingBean public co.elastic.clients.transport.rest_client.RestClientTransport restClientTransport(org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchProperties elasticsearchProperties, HvlLogSearchElasticsearchSSLProperties logSearchElasticsearchSSLProperties) throws CertificateException, KeyStoreException, IOException, NoSuchAlgorithmException, KeyManagementException
      Rest client transport rest client transport.
      Parameters:
      elasticsearchProperties - the elasticsearch properties
      logSearchElasticsearchSSLProperties - the log search elasticsearch ssl properties
      Returns:
      the rest client transport
      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
    • elasticsearchClient

      @Bean @ConditionalOnMissingBean public co.elastic.clients.elasticsearch.ElasticsearchClient elasticsearchClient(co.elastic.clients.transport.rest_client.RestClientTransport restClientTransport)
      Client rest high level client.
      Parameters:
      restClientTransport - the rest client transport
      Returns:
      the rest high level client
    • elasticsearchTemplate

      @Bean @ConditionalOnMissingBean public org.springframework.data.elasticsearch.client.elc.ElasticsearchTemplate elasticsearchTemplate(co.elastic.clients.elasticsearch.ElasticsearchClient elasticsearchClient) throws IOException
      Elasticsearch template elasticsearch rest template.
      Parameters:
      elasticsearchClient - the rest high level client
      Returns:
      the elasticsearch rest template
      Throws:
      IOException - the io exception