springboot整合elasticsearch high client获取RestHighLevelClient失败

背景信息

springboot version: 2.1.15
elasticsearch version: 7.4.2

Spring在查找RestHighLevelClient时抛出异常。

java.lang.ClassNotFoundException: org.elasticsearch.action.admin.cluster.repositories.cleanup.Cleanu
问题分析

未导入Elasticsearch核心包

解决方案
    7.4.2
        <dependency>
            <groupId>org.elasticsearchgroupId>
            <artifactId>elasticsearchartifactId>
            <version>${elasticsearch.version}version>
        dependency>

你可能感兴趣的:(爬坑指南,springboot,elasticsearch)