Merge branch '1.2.x'

This commit is contained in:
Andy Wilkinson 2015-03-17 11:49:03 +00:00
commit b2a68d700f
3 changed files with 16 additions and 0 deletions

View File

@ -87,6 +87,7 @@ public class ElasticsearchAutoConfiguration implements DisposableBean {
TransportClientFactoryBean factory = new TransportClientFactoryBean(); TransportClientFactoryBean factory = new TransportClientFactoryBean();
factory.setClusterName(this.properties.getClusterName()); factory.setClusterName(this.properties.getClusterName());
factory.setClusterNodes(this.properties.getClusterNodes()); factory.setClusterNodes(this.properties.getClusterNodes());
factory.setClientTransportSniff(this.properties.getClientTransportSniff());
factory.afterPropertiesSet(); factory.afterPropertiesSet();
TransportClient client = factory.getObject(); TransportClient client = factory.getObject();
this.releasable = client; this.releasable = client;

View File

@ -39,6 +39,11 @@ public class ElasticsearchProperties {
*/ */
private String clusterNodes; private String clusterNodes;
/**
* Allow the client to sniff for other members of the cluster.
*/
private boolean clientTransportSniff = true;
public String getClusterName() { public String getClusterName() {
return this.clusterName; return this.clusterName;
} }
@ -54,4 +59,13 @@ public class ElasticsearchProperties {
public void setClusterNodes(String clusterNodes) { public void setClusterNodes(String clusterNodes) {
this.clusterNodes = clusterNodes; this.clusterNodes = clusterNodes;
} }
public boolean getClientTransportSniff() {
return this.clientTransportSniff;
}
public void setClientTransportSniff(boolean clientTransportSniff) {
this.clientTransportSniff = clientTransportSniff;
}
} }

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 spring.data.solr.repositories.enabled=true # if spring data repository support is enabled
# ELASTICSEARCH ({sc-spring-boot-autoconfigure}/elasticsearch/ElasticsearchProperties.{sc-ext}[ElasticsearchProperties]) # 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-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.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 spring.data.elasticsearch.repositories.enabled=true # if spring data repository support is enabled