@Service @Validated public class ESClient extends Object
RestClient
implementation of the ES Java client.Constructor and Description |
---|
ESClient(Properties properties) |
Modifier and Type | Method and Description |
---|---|
org.elasticsearch.client.RestHighLevelClient |
getClient()
Returns the RestHighLevelClient.
|
void |
init()
Post-construct client initialization method.
|
void |
shutdown()
Default shutdown hook.
|
@Autowired public ESClient(Properties properties)
@PostConstruct public void init()
public void shutdown() throws IOException
IOException
- If client can not be closed.public org.elasticsearch.client.RestHighLevelClient getClient()
RestClient
instance.Copyright © 2020. All rights reserved.