当前位置:网站首页>RestClient操作索引库-初始化RestClient
RestClient操作索引库-初始化RestClient
2022-07-22 21:49:00 【其然乐衣】
1.引入es的RestHighLevelClient依赖:
<!--elasticsearch-->
<dependency>
<groupId>org.elasticsearch.client</groupId>
<artifactId>elasticsearch-rest-high-level-client</artifactId>
<version>7.12.1</version>
</dependency>2.因为SpringBoot默认的ES版本是7.6.2,所以我们需要覆盖默认的ES版本:

3.初始化RestHighLevelClient:
return new RestHighLevelClient(RestClient.builder(
HttpHost.create("http://192.168.150.101:9200")
));
边栏推荐
- File upload, server file name Chinese garbled file upload, server file name Chinese garbled
- Problems encountered in punching
- Rust -- detailed explanation of option
- 1.11 ArrayList&学生管理系统
- 组蛋白研究丨Worthington小牛胸腺组蛋白的特征及文献参考
- LAN SDN technology hard core insider 7 from layer 2 to layer 2
- 项目升级遇到的坑
- 亚马逊旗下Zoox通过安全测试 并在加州申请试驾
- About redis, do you update the database first or the cache first?
- MySQL消息队列表结构
猜你喜欢

Experiment 5 JPEG

Three things programmers want to do most | comics

@Transactional transaction methods contain multiple transaction methods of the same kind. These transaction methods themselves are set to fail. There are two solutions

数据脱敏的场景与价值【总结】

自定义flink es source

记一次线上SQL死锁事故:如何避免死锁?

6-14漏洞利用-rpcbind漏洞利用

@Transactional事务方法中包含多个同类事务方法,这些事务方法本身设置失效两种解决方案

VMware虚拟机更改静态IP和主机名,使用Xshell进行连接

zabbix agent创建监控项
随机推荐
Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
Mysql无法访问,navicat提示:is not allowed to connect to this MySQL server
我为OpenHarmony 写代码,战“码”先锋第二期正式开启!
LAN SDN hard core technology insider 19 unite all forces that can be united
Worthington纯化酶制剂助力新生儿心肌细胞分离系统研究
1.10 API 和字符串
Scala gets all files in the specified directory
如何保护 JDBC 应用程序免受 SQL 注入
实验二 YUV
【第31天】给定一个整数 n ,求出它的每个质因数的底数与指数 | 算术基本定理
squid代理服务+ip代理池
6-14漏洞利用-rpcbind漏洞利用
Simulate not all endpoints registered exceptions and Solutions
LAN SDN hard core technology insider 17 from one to 100
Why does MySQL index use b+ tree instead of jump table?
FastAPI学习(二)——FastAPI+Jinjia2模板渲染网页(跳转返回渲染页面)
pny 文件转图片
Inside the hard core of LAN SDN technology - evpn implementation of 16 three from thing to person user roaming in the park
Mysql A left(right) join B on A.id=B. ID and a.age=1 and a left (right) join b on a.id=b id where A.age=1
牛客小白月赛53