use of org.springframework.data.elasticsearch.client.TransportClientFactoryBean in project spring-boot by spring-projects.
the class ElasticsearchAutoConfiguration method createTransportClient.
private Client createTransportClient() throws Exception {
TransportClientFactoryBean factory = new TransportClientFactoryBean();
factory.setClusterNodes(this.properties.getClusterNodes());
factory.setProperties(createProperties());
factory.afterPropertiesSet();
TransportClient client = factory.getObject();
this.releasable = client;
return client;
}
Aggregations