Merge branch '1.2.x'
This commit is contained in:
@@ -87,6 +87,7 @@ public class ElasticsearchAutoConfiguration implements DisposableBean {
|
||||
TransportClientFactoryBean factory = new TransportClientFactoryBean();
|
||||
factory.setClusterName(this.properties.getClusterName());
|
||||
factory.setClusterNodes(this.properties.getClusterNodes());
|
||||
factory.setClientTransportSniff(this.properties.getClientTransportSniff());
|
||||
factory.afterPropertiesSet();
|
||||
TransportClient client = factory.getObject();
|
||||
this.releasable = client;
|
||||
|
||||
@@ -39,6 +39,11 @@ public class ElasticsearchProperties {
|
||||
*/
|
||||
private String clusterNodes;
|
||||
|
||||
/**
|
||||
* Allow the client to sniff for other members of the cluster.
|
||||
*/
|
||||
private boolean clientTransportSniff = true;
|
||||
|
||||
public String getClusterName() {
|
||||
return this.clusterName;
|
||||
}
|
||||
@@ -54,4 +59,13 @@ public class ElasticsearchProperties {
|
||||
public void setClusterNodes(String clusterNodes) {
|
||||
this.clusterNodes = clusterNodes;
|
||||
}
|
||||
|
||||
public boolean getClientTransportSniff() {
|
||||
return this.clientTransportSniff;
|
||||
}
|
||||
|
||||
public void setClientTransportSniff(boolean clientTransportSniff) {
|
||||
this.clientTransportSniff = clientTransportSniff;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user