问答详情
源自:6-1 SpringBoot集成ElasticSearch

TransportClient 无法被引用到

请问老师 为什么transport  jar包里面只有一个PreBuiltTransportClient.class类呢,其他的类引用不到

下面这是添加的依赖

<dependency>

    <groupId>org.elasticsearch.client</groupId>

    <artifactId>transport</artifactId>

    <version>5.2.2</version>

</dependency>


提问者:慕容1887089 2018-03-15 16:41

个回答

  • Kiroro_Level_Up
    2018-03-16 22:06:43
    已采纳

    <dependency>
      <groupId>org.elasticsearch</groupId>
      <artifactId>elasticsearch</artifactId>
      <version>${version.elasticsearch}</version>
    </dependency>

    <dependency>
      <groupId>org.elasticsearch.client</groupId>
      <artifactId>transport</artifactId>
      <version>${version.elasticsearch}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <version>2.7</version>
    </dependency>

    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-api</artifactId>
      <version>2.7</version>
    </dependency>