<!-- 使用elasticsearch 需要导入两个包,从网上复制的可能因为有特殊字符报
cvc-complex-type.2.3: Element 'dependency' cannot have character [children], because the type's content type is element-only.
错误,只需要自己重新排版即可
-->
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>transport</artifactId>
<version>6.3.0</version>
</dependency>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>6.3.0</version>
</dependency>

首先是自己导入的只有一个client的jar包,导致在写测试类的时候无法导入下面这个类的包

在搭建Maven项目时导入elasticsearch架包时遇到的问题

 

在搭建Maven项目时导入elasticsearch架包时遇到的问题

在导入了第二个jar包之后正常了

 

相关文章:

  • 2021-06-02
  • 2021-08-28
  • 2021-08-01
  • 2022-12-23
  • 2022-12-23
  • 2021-06-20
  • 2021-08-22
  • 2021-06-26
猜你喜欢
  • 2021-10-11
  • 2021-09-04
  • 2022-12-23
  • 2021-03-29
  • 2021-10-27
  • 2022-12-23
  • 2021-04-03
相关资源
相似解决方案