Commit cdbf5890 by yangyang

es地址切换提交(湖南)

parent 52bec921
...@@ -27,10 +27,10 @@ public class ElasticSearchClientConfig { ...@@ -27,10 +27,10 @@ public class ElasticSearchClientConfig {
RestHighLevelClient client = null; RestHighLevelClient client = null;
//需要用户名和密码的认证 //需要用户名和密码的认证
final CredentialsProvider credentialsProvider = new BasicCredentialsProvider(); final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials("elastic", "admin@43")); credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials("elastic", "admin#43"));
RestClientBuilder restClientBuilder = RestClient.builder( RestClientBuilder restClientBuilder = RestClient.builder(
//new HttpHost("47.92.225.109",9200,"http")) //new HttpHost("47.92.225.109",9200,"http"))
new HttpHost("10.142.16.191",9209,"http")) new HttpHost("10.142.16.118",9205,"http"))
//new HttpHost(node2,port,"http"), //new HttpHost(node2,port,"http"),
//new HttpHost(node3,port,"http")) //new HttpHost(node3,port,"http"))
.setHttpClientConfigCallback( new RestClientBuilder.HttpClientConfigCallback() { .setHttpClientConfigCallback( new RestClientBuilder.HttpClientConfigCallback() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment