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
-
Method Summary
Modifier and TypeMethodDescriptionco.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
-
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 propertieslogSearchElasticsearchSSLProperties
- the log search elasticsearch ssl properties- Returns:
- the rest client transport
- Throws:
CertificateException
- the certificate exceptionKeyStoreException
- the key store exceptionIOException
- the io exceptionNoSuchAlgorithmException
- the no such algorithm exceptionKeyManagementException
- 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
-