Reputation: 2102
I have a springboot app which connects to ElasticSearch. However I would like to use ElasticsearchRestTemplate
and I get only classNotFound.
My pom.xml
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.5.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-elasticsearch</artifactId>
<version>3.1.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
</dependency>
<dependencies>
And when I try to do import
import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate;
It shows that the class does not exist. How to solve that ? Which version of Spring Elasticsearch Data to be able to use ElasticsearchRestTemplate ?
Upvotes: 2
Views: 2832