我正在使用Spring Boot 2.0.3版本,并且在实例化org.elasticsearch.client.Client时遇到问题.我的代码:
Client client = new PreBuiltTransportClient(Settings.builder()
.put("cluster.name",clustername)
.build())
.addTransportAddress(
new InetSocketTransportAddress(InetAddress.getByName(host),port)
);
Caused by: java.lang.NoClassDefFoundError: org/elasticsearch/transport/Netty3Plugin
at org.elasticsearch.transport.client.PreBuiltTransportClient.
我使用org.elasticsearch:elasticsearch:5.6.10和org.elasticsearch.client:client:5.6.10.
最佳答案
原文链接:https://www.f2er.com/spring/431586.html