es 服务器版本是6.1.4
pom引入的依赖也是6.1.4
<dependency><groupId>org.elasticsearch</groupId><artifactId>elasticsearch</artifactId><version>6.1.4</version>
</dependency><dependency><groupId>org.elasticsearch.client</groupId><artifactId>transport</artifactId><version>6.1.4</version>
</dependency>
报以下错误 TransportClient llegalstateException : Unsupported transport.type [netty4]
。
处理方法:
添加netty-client的依赖
<dependency><groupId>org.elasticsearch.plugin</groupId><artifactId>transport-netty-client</artifactId><version>6.1.4</version>
</dependency>