Search in sources :

Example 1 with TransportClientFactoryBean

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;
}
Also used : TransportClientFactoryBean(org.springframework.data.elasticsearch.client.TransportClientFactoryBean) TransportClient(org.elasticsearch.client.transport.TransportClient)

Aggregations

TransportClient (org.elasticsearch.client.transport.TransportClient)1 TransportClientFactoryBean (org.springframework.data.elasticsearch.client.TransportClientFactoryBean)1