Class ReactiveElasticsearchConfiguration

java.lang.Object
org.springframework.data.elasticsearch.config.ElasticsearchConfigurationSupport
org.springframework.data.elasticsearch.client.elc.ReactiveElasticsearchConfiguration

public abstract class ReactiveElasticsearchConfiguration extends ElasticsearchConfigurationSupport
Base class for a @Configuration class to set up the Elasticsearch connection using the ReactiveElasticsearchClient.
Since:
4.4
Author:
Peter-Josef Meisch
  • Constructor Details

    • ReactiveElasticsearchConfiguration

      public ReactiveElasticsearchConfiguration()
  • Method Details

    • clientConfiguration

      @Bean(name="elasticsearchClientConfiguration") public abstract ClientConfiguration clientConfiguration()
      Must be implemented by deriving classes to provide the ClientConfiguration.
      Returns:
      configuration, must not be null
    • elasticsearchRestClient

      @Bean public org.elasticsearch.client.RestClient elasticsearchRestClient(ClientConfiguration clientConfiguration)
      Provides the underlying low level RestClient.
      Parameters:
      clientConfiguration - configuration for the client, must not be null
      Returns:
      RestClient
    • reactiveElasticsearchClient

      @Bean public ReactiveElasticsearchClient reactiveElasticsearchClient(org.elasticsearch.client.RestClient restClient)
      Provides the ReactiveElasticsearchClient instance used.
      Parameters:
      restClient - the low level RestClient to use
      Returns:
      ReactiveElasticsearchClient instance.
    • reactiveElasticsearchOperations

      @Bean(name={"reactiveElasticsearchOperations","reactiveElasticsearchTemplate"}) public ReactiveElasticsearchOperations reactiveElasticsearchOperations(ElasticsearchConverter elasticsearchConverter, ReactiveElasticsearchClient reactiveElasticsearchClient)
      Returns:
      never null.
    • transportOptions

      public co.elastic.clients.transport.TransportOptions transportOptions()
      Returns:
      the options that should be added to every request. Must not be null