集成背景
elk或者快速搜索都要用到elasticsearch,源于他的速度非常快。如何采用最新的接口集成,下面就介绍一个样例。
代码示例
1. 加依赖
<properties>
<java.version>1.8</java.version>
<elastic.version>7.8.0</elastic.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId></