9 Kasım 2023 Perşembe

SpringData ElasticSearch ReactiveElasticsearchClient Arayüzü

Giriş
Şu satırı dahil ederiz 
import org.springframework.data.elasticsearch.client.reactive.ReactiveElasticsearchClient;
Örnek
Şöyle yaparız
@Configuration
public class ReactiveRestClientConfig extends AbstractReactiveElasticsearchConfiguration {
  @Override
  public ReactiveElasticsearchClient reactiveElasticsearchClient() {
    ClientConfiguration clientConfiguration = ClientConfiguration.builder()
      .connectedTo("localhost:9200")
      .build();
    return ReactiveRestClients.create(clientConfiguration);
  }
}

Hiç yorum yok:

Yorum Gönder