SpringBoot整合Elasticsearch报错:Unable to parse response body for Response

具体报错:
java.io.IOException: Unable to parse response body for Response{requestLine=PUT /books/_doc/1?timeout=1m HTTP/1.1, host=http://localhost:9200, response=HTTP/1.1 201 Created}
原因:

根据官方提供的文档,SpringBoot支持的Elasticsearch对应版本

Elasticsearch的迭代太快了,springboot不一定支持,导致我使用Elasticsearch 8.0的时候报错,根据你的springboot版本更换掉对应的Elasticsearch 版本即可

 
下面是官方提供的Elasticsearch对应springboot版本,具体地址:https://docs.spring.io/spring-data/elasticsearch/docs/current/reference/html/ 

posted @ 2022-08-13 14:59  weifufa  阅读(2816)  评论(0)    收藏  举报