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 TypeMethodDescriptionorg.elasticsearch.client.RestHighLevelClient
elasticsearchClient
(org.springframework.boot.autoconfigure.elasticsearch.ElasticsearchProperties elasticsearchProperties, HvlLogSearchElasticsearchSSLProperties logSearchElasticsearchSSLProperties) Client rest high level client.org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate
elasticsearchTemplate
(org.elasticsearch.client.RestHighLevelClient restHighLevelClient) Elasticsearch template elasticsearch rest template.Methods inherited from class tr.com.havelsan.javarch.configuration.HvlBaseConfiguration
info
-
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 propertieslogSearchElasticsearchSSLProperties
- the log search elasticsearch ssl properties- Returns:
- the rest high level client
- Throws:
CertificateException
- the certificate exceptionKeyStoreException
- the key store exceptionIOException
- the io exceptionNoSuchAlgorithmException
- the no such algorithm exceptionKeyManagementException
- 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
-