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.

Closes gh-1838
This commit is contained in:
Andy Wilkinson
2015-03-17 11:48:43 +00:00
parent b82e220008
commit 89b4cac8b0
3 changed files with 16 additions and 0 deletions

View File

@@ -349,6 +349,7 @@ content into your application; rather pick only the properties that you need.
spring.data.solr.repositories.enabled=true # if spring data repository support is enabled
# ELASTICSEARCH ({sc-spring-boot-autoconfigure}/elasticsearch/ElasticsearchProperties.{sc-ext}[ElasticsearchProperties])
spring.data.elasticsearch.client-transport-sniff=true # Allow the client to sniff for other members of the cluster
spring.data.elasticsearch.cluster-name= # The cluster name (defaults to elasticsearch)
spring.data.elasticsearch.cluster-nodes= # The address(es) of the server node (comma-separated; if not specified starts a client node)
spring.data.elasticsearch.repositories.enabled=true # if spring data repository support is enabled