Last active
January 22, 2019 14:48
-
-
Save spati-java/0afc1916b99261ad006b1a5aef30f0f4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
public class ElasticsearchConfig { | |
@Value("${elasticsearch.host}") | |
private String elasticsearchHost; | |
@Bean(destroyMethod = "close") | |
public RestHighLevelClient client() { | |
RestHighLevelClient client = new RestHighLevelClient( | |
RestClient.builder(new HttpHost(elasticsearchHost))); | |
return client; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment