|
@@ -54,7 +54,7 @@ public class ElasticSearchClientConfig {
|
|
|
|
|
|
@Bean
|
|
|
public ElasticsearchClient elasticsearchClient() throws Exception {
|
|
|
- RestClientBuilder builder = RestClient.builder(new HttpHost("192.168.2.24", 9200, "http"));
|
|
|
+ RestClientBuilder builder = RestClient.builder(new HttpHost(config, 9200, "http"));
|
|
|
CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
|
|
|
credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials("elastic", "xiaoshi221101"));
|
|
|
SSLContext sslContext = SSLContextBuilder.create()
|