脚本宝典收集整理的这篇文章主要介绍了升级springboot支持elasticsearch2.x版本,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
序
在sPRingboot 1.4之前,如果使用spring data elasticse@R_126_2413@ 2.x版本,则启动会报错,因为springboot1.4版本之前依赖的es是1.x版本的。在1.4版本出来之前,尚不能使用es2.x版本。
升级到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>
非release版
<!-- 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>
参考
以上是脚本宝典为你收集整理的升级springboot支持elasticsearch2.x版本全部内容,希望文章能够帮你解决升级springboot支持elasticsearch2.x版本所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。