Elasticsearch java api引用時,啟動報錯
肯定是引用包的問題, 我的Elasticsearch用的6.3.2, 我用的一下依賴,試了很久才正常啟動。
<dependency> <groupId>io.netty</groupId> <artifactId>netty-all</artifactId> <version>4.1.13.Final</version> </dependency> <dependency> <groupId>org.elasticsearch</groupId> <artifactId>elasticsearch</artifactId> <version>6.3.2</version> </dependency> <dependency> <groupId>org.elasticsearch.client</groupId> <artifactId>transport</artifactId> <version>6.3.2</version> <exclusions> <exclusion> <groupId>org.elasticsearch</groupId> <artifactId>elasticsearch</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.apache.lucene</groupId> <artifactId>lucene-core</artifactId> <version>7.3.1</version> </dependency> </dependencies>