From c6c649f6440153e6117a806e6c75b10a3b169988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Nicoll?= Date: Sat, 15 Nov 2025 10:46:56 +0100 Subject: [PATCH] Polish "Elasticsearch starter should depend on elasticsearch-java" See gh-48141 --- .../src/docs/antora/modules/reference/pages/data/nosql.adoc | 2 +- starter/spring-boot-starter-elasticsearch/build.gradle | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/data/nosql.adoc b/documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/data/nosql.adoc index c4cad3790c8..ffb71258c39 100644 --- a/documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/data/nosql.adoc +++ b/documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/data/nosql.adoc @@ -361,7 +361,7 @@ To disable auto-configuration of the Sniffer, set configprop:spring.elasticsearc [[data.nosql.elasticsearch.connecting-using-rest.javaapiclient]] ==== Connecting to Elasticsearch Using ElasticsearchClient -If you have `co.elastic.clients:elasticsearch-java` on the classpath, Spring Boot will auto-configure and register an javadoc:co.elastic.clients.elasticsearch.ElasticsearchClient[] bean. +If you use the `spring-boot-starter-elasticsearch` or have added `co.elastic.clients:elasticsearch-java` to the classpath, Spring Boot will auto-configure and register an javadoc:co.elastic.clients.elasticsearch.ElasticsearchClient[] bean. The javadoc:co.elastic.clients.elasticsearch.ElasticsearchClient[] uses a transport that depends upon the previously described javadoc:co.elastic.clients.transport.rest5_client.low_level.Rest5Client[]. Therefore, the properties described previously can be used to configure the javadoc:co.elastic.clients.elasticsearch.ElasticsearchClient[]. diff --git a/starter/spring-boot-starter-elasticsearch/build.gradle b/starter/spring-boot-starter-elasticsearch/build.gradle index 13ba1dc9e5a..e7f88fcb904 100644 --- a/starter/spring-boot-starter-elasticsearch/build.gradle +++ b/starter/spring-boot-starter-elasticsearch/build.gradle @@ -24,8 +24,5 @@ dependencies { api(project(":starter:spring-boot-starter")) api(project(":module:spring-boot-elasticsearch")) - - api("co.elastic.clients:elasticsearch-java") { - exclude group: "commons-logging", module: "commons-logging" - } + api("co.elastic.clients:elasticsearch-java") }