mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-29 07:12:26 +00:00
ClientConfigurer is only available in MaybeSecureClientConfigurationBuilder.
The documentation code does not compile and I'm not sure if it's a bug in the code or a miss in the documentation. When you want to configure a client, the doc says to use: ```java ClientConfiguration.builder().withClientConfigurer( // ... ``` But `withClientConfigurer(ClientConfiguration.ClientConfigurationCallback<?> clientConfigurer)` is only available in `TerminalClientConfigurationBuilder` interface. And `ClientConfiguration.builder()` returns a `ClientConfigurationBuilderWithRequiredEndpoint` interface.
This commit is contained in:
parent
21a1fbca0f
commit
02bd3e60f8
@ -192,6 +192,7 @@ This callback provides a `org.elasticsearch.client.RestClientBuilder` that can b
|
|||||||
[source,java]
|
[source,java]
|
||||||
----
|
----
|
||||||
ClientConfiguration.builder()
|
ClientConfiguration.builder()
|
||||||
|
.connectedTo("localhost:9200", "localhost:9291")
|
||||||
.withClientConfigurer(ElasticsearchClients.ElasticsearchRestClientConfigurationCallback.from(restClientBuilder -> {
|
.withClientConfigurer(ElasticsearchClients.ElasticsearchRestClientConfigurationCallback.from(restClientBuilder -> {
|
||||||
// configure the Elasticsearch RestClient
|
// configure the Elasticsearch RestClient
|
||||||
return restClientBuilder;
|
return restClientBuilder;
|
||||||
@ -210,6 +211,7 @@ used by the `RestClient`.
|
|||||||
[source,java]
|
[source,java]
|
||||||
----
|
----
|
||||||
ClientConfiguration.builder()
|
ClientConfiguration.builder()
|
||||||
|
.connectedTo("localhost:9200", "localhost:9291")
|
||||||
.withClientConfigurer(ElasticsearchClients.ElasticsearchHttpClientConfigurationCallback.from(httpAsyncClientBuilder -> {
|
.withClientConfigurer(ElasticsearchClients.ElasticsearchHttpClientConfigurationCallback.from(httpAsyncClientBuilder -> {
|
||||||
// configure the HttpAsyncClient
|
// configure the HttpAsyncClient
|
||||||
return httpAsyncClientBuilder;
|
return httpAsyncClientBuilder;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user