Spring boot + Spring数据弹性搜索+弹性搜索5.6.0

时间:2017-12-27 15:19:49

标签: elasticsearch spring-data

我正在尝试使用Elastic Search 5.4.1构建一个Spring Boot应用程序(1.5.9.RELEASE),当我运行maven>时,我遇到了这种冲突。安装

failed to run

我的pom.xml是

<properties>
    ...
    <elasticsearch.version>5.4.1</elasticsearch.version>
</properties>
<repositories>
    <repository>
        <id>spring-libs-snapshot</id>
        <name>Spring Snapshot Repository</name>
        <url>http://repo.spring.io/libs-snapshot</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-elasticsearch</artifactId>
        <version>3.0.0.RC2</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-elasticsearch</artifactId>
    </dependency>
    <dependency>
        <groupId>org.elasticsearch.client</groupId>
        <artifactId>transport</artifactId>
        <version>5.1.1</version>
    </dependency><dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter</artifactId>
    </dependency><dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-commons-core</artifactId>
        <version>1.0.0.RELEASE</version>
    </dependency>

欢迎任何帮助,谢谢!

1 个答案:

答案 0 :(得分:3)

这是由于spring-data-elasticsearch,elasticsearch和springboot之间的兼容性问题 看看这个并相应地改变

https://github.com/spring-projects/spring-data-elasticsearch/wiki/Spring-Data-Elasticsearch---Spring-Boot---version-matrix