SpringBoot整合Elasticsearch报错

本文来记录一下SpringBoot整合Elasticsearch报错


报错如下

报错如下

2024-01-02 15:09:10.349 ERROR 134936 --- [nio-8088-exec-6] o.a.c.c.C.[.[.[/].
[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in 
context with path [] threw exception [Request processing failed; nested 
exception is org.springframework.dao.DataAccessResourceFailureException: 
Unable to parse response body for Response{requestLine=PUT /article
/_doc/112233?timeout=1m HTTP/1.1, host=http://localhost:9200, 
response=HTTP/1.1 200 OK}; nested exception is java.lang.RuntimeException: 
Unable to parse response body for Response{requestLine=PUT /article
/_doc/112233?timeout=1m HTTP/1.1, host=http://localhost:9200, 
response=HTTP/1.1 200 OK}] with root cause


报错原因

根据官方提供的文档,选择SpringBoot支持的Elasticsearch对应版。Elasticsearch的迭代太快了,springboot不一定支持,导致我使用Elasticsearch 8.0的时候报错,根据你的springboot版本更换掉对应的Elasticsearch 版本即可。
SpringData官方的ElasticSearch版本支持简介

在这里插入图片描述


es7.15.2版本下载

Elasticsearch 7.15.2版本下载:https://www.elastic.co/cn/downloads/past-releases/elasticsearch-7-15-2

在这里插入图片描述

成功访问

在这里插入图片描述

相关推荐

  1. springboot整合elasticsearch

    2024-01-03 12:42:02       45 阅读
  2. SpringBoot整合ElasticSearch应用

    2024-01-03 12:42:02       35 阅读
  3. 使用Springboot整合Elasticsearch

    2024-01-03 12:42:02       33 阅读
  4. SpringBoot整合ElasticSearch

    2024-01-03 12:42:02       20 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-01-03 12:42:02       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-01-03 12:42:02       106 阅读
  3. 在Django里面运行非项目文件

    2024-01-03 12:42:02       87 阅读
  4. Python语言-面向对象

    2024-01-03 12:42:02       96 阅读

热门阅读

  1. QT 高DPI解决方案

    2024-01-03 12:42:02       62 阅读
  2. 分布式(4)

    2024-01-03 12:42:02       55 阅读
  3. 分布式(3)

    2024-01-03 12:42:02       59 阅读
  4. 安卓作业001 - 显示学生信息

    2024-01-03 12:42:02       50 阅读
  5. 单片机相关知识点

    2024-01-03 12:42:02       64 阅读
  6. 提升开发效率,程序员都在使用的免费api

    2024-01-03 12:42:02       67 阅读
  7. 【ASP.NET Core 基础知识】--介绍

    2024-01-03 12:42:02       52 阅读
  8. 静态pod

    2024-01-03 12:42:02       57 阅读
  9. Unity游戏引擎的2D碰撞检测

    2024-01-03 12:42:02       72 阅读
  10. 欢迎来到MySQL优化之旅

    2024-01-03 12:42:02       67 阅读