1、client
@Bean public RestHighLevelClient client() { //client对象就是操作ES的对象 RestHighLevelClient client = new RestHighLevelClient(RestClient.builder (HttpHost.create("http://192.168.221.131:9200"))); return client; }
2、注入
@Resource private RestHighLevelClient client;标签:221.131,9200,192.168,client,ElasticSearch,RestHighLevelClient From: https://www.cnblogs.com/Rover20230226/p/17500921.html