Upgrade springboot to support elasticsearch2.x version 2.x

  elasticsearch, springboot

Order

Before springboot 1.4, if Spring Data Elasticity Search version 2.x is used, the boot will report an error, because es relied on before springboot1.4 is version 1.x. Es2.x cannot be used until version 1.4 is released.

Upgrade to springboot1.4

parent

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.4.0.M3</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

Non-release Edition

<!-- Add Spring repositories -->
    <!-- (you don't need this if you are using a .RELEASE version) -->
    <repositories>
        <repository>
            <id>spring-snapshots</id>
            <url>http://repo.spring.io/snapshot</url>
            <snapshots><enabled>true</enabled></snapshots>
        </repository>
        <repository>
            <id>spring-milestones</id>
            <url>http://repo.spring.io/milestone</url>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>spring-snapshots</id>
            <url>http://repo.spring.io/snapshot</url>
        </pluginRepository>
        <pluginRepository>
            <id>spring-milestones</id>
            <url>http://repo.spring.io/milestone</url>
        </pluginRepository>
    </pluginRepositories>

spring-data-elasticsearch2.x

<!-- http://mvnrepository.com/artifact/org.springframework.data/spring-data-elasticsearch -->
        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-elasticsearch</artifactId>
            <version>2.0.1.RELEASE</version>
        </dependency>

References