Auto-configure Elasticsearch REST clients

This commit adds auto-configuration support for both `RestClient` and
`RestHighLevelClient` which are provided by `elasticsearch-rest-client`
and `elasticsearch-rest-high-level-client` dependencies respectively.

`RestClient` is associated with configuration properties in the
`spring.elasticsearch.rest.*` namespace, since this is the component
taking care of HTTP communication with the actual Elasticsearch node.

`RestHighLevelClient` wraps the first one and naturally inherits that
configuration.

Closes gh-12600
This commit is contained in:
Brian Clozel
2018-05-07 17:57:09 +02:00
parent 43ef5ba205
commit 84c9a65e9d
12 changed files with 429 additions and 23 deletions

View File

@@ -1757,6 +1757,16 @@
<artifactId>transport-netty4-client</artifactId>
<version>${elasticsearch.version}</version>
</dependency>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-client</artifactId>
<version>${elasticsearch.version}</version>
</dependency>
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>${elasticsearch.version}</version>
</dependency>
<dependency>
<groupId>org.firebirdsql.jdbc</groupId>
<artifactId>jaybird-jdk17</artifactId>