package com.luding.diankan.es.utils; import org.apache.http.HttpHost; import org.apache.http.client.config.RequestConfig; import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.client.RestClient; import org.elasticsearch.client.RestClientBuilder; import org.elasticsearch.client.RestHighLevelClient; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.stereotype.Component; import java.util.Arrays; @Component public class ElasticsearchConfig { @Value("${elasticSearch.url}") private String esUrl; @Value("${elasticSearch.port}") private String esPort; @Value("${elasticSearch.indexName}") private String esIndexName; @Bean public RestHighLevelClient restHighLevelClient() { String[] ips = esUrl.split(","); Ht
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)