You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow Elasticsearch client-transport-sniff to be configured via the env
Previously, a TransportClient sniff property could not be configured
while using Spring Boot’s Elasticsearch auto-configuration. This commit
adds a new property, spring.data.elasticsearch.client-transport-sniff,
that can be used to configure the TransportClient while continuing to
use the auto-configuration support.
Closesgh-1838
Copy file name to clipboardExpand all lines: spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/ElasticsearchAutoConfiguration.java
Copy file name to clipboardExpand all lines: spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/ElasticsearchProperties.java
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,11 @@ public class ElasticsearchProperties {
39
39
*/
40
40
privateStringclusterNodes;
41
41
42
+
/**
43
+
* Allow the client to sniff for other members of the cluster.
44
+
*/
45
+
privatebooleanclientTransportSniff = true;
46
+
42
47
publicStringgetClusterName() {
43
48
returnthis.clusterName;
44
49
}
@@ -54,4 +59,13 @@ public String getClusterNodes() {
0 commit comments