Springboot2.0 集成 Elasticsearch 6.x 未添加 transport-netty4-client 依赖 启动时报错

报错内容关键部分:

Failed to instantiate [org.elasticsearch.client.transport.TransportClient]: Factory method 'transportClient' threw exception; nested exception is java.lang.NoClassDefFoundError: org/elasticsearch/common/transport/InetSocketTransportAddress

解决方法,添加依赖 transport-netty4-client Maven依赖:


    org.elasticsearch.plugin
    transport-netty4-client
    6.2.3

版本号根据elasticsearch的版本号做相应改变

你可能感兴趣的:(Elasticsearch)