【SpringBoot】SpringBoot集成ElasticSearch
文章目录
- 第一步,导入jar包,注意这里的jar包版本可能和你导入的不一致,所以需要修改
- 第二步,编写配置类
- 第三步,填写yml
- 第四步,编写util类
- 第五步,编写controller类
- 第六步,测试即可
第一步,导入jar包,注意这里的jar包版本可能和你导入的不一致,所以需要修改
<properties>
<properties><java.version>1.8</java.version><elasticsearch.version>7.6.2</elasticsearch.version>
</properties>
<!-- elasticsearch -->
<!--es客户端-->
<dependency><groupId>org.elasticsearch.client</groupId><artifactId>elasticsearch-rest-high-level-client</artifactId><version>7.6.2</version>
</dependency><!--springboot的elasticsearch服务-->
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-elasticsearch</artifactId>
</dependency>
第二步,编写配置类
这段代码是一个基本的 Elasticsearch Java 客户端的配置类,用于创建一个 RestHighLevelClient 实例。
其中 RestHighLevelClient 是 Elasticsearch Java 客户端的高级别别名,是基于 LowLevelClient 之上的封装,提供了一些更加方便的方法和功能。
在这段代码中,使用了 @Value 注解来注入三个配置项,包括 hostname,port 和 scheme。这三个配置项分别表示 Elasticsearch 服务器的主机名或 IP 地址,端口号和通信协议。然后使用RestClient.builder() 方法来创建一个 RestClient 实例,传入 Elasticsearch 服务器的地址和端口号,最后将 RestClient 实例传入 RestHighLevelClient 的构造函数中,即可创建一个 RestHighLevelClient 实例。
需要注意的是,这段代码中的 RestHighLevelClient 实例是一个单例对象,只需要在应用程序启动时创建一次即可,因此这个类应该被配置为一个 Spring Bean,以便在需要时注入到其他类中使用。
import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;@Configuration
public class ElasticSearchClientConfig {@Value("${elasticSearch.hostname}")private String hostname;@Value("${elasticSearch.port}")private Integer port;@Value("${elasticSearch.scheme}")private String scheme;@Beanpublic RestHighLevelClient restHighLevelClient(){return new RestHighLevelClient(RestClient.builder(new HttpHost(hostname,port,scheme)));}
}
第三步,填写yml
elasticSearch:hostname: 127.0.0.1port: 9200scheme: http
第四步,编写util类
这是一个Java类,实现了Elasticsearch API的一些基本功能。它定义了创建、检查是否存在、删除索引、添加、修改和删除文档以及搜索文档的方法。该类使用Elasticsearch API的RESTful客户端来执行这些操作。
以下是每种方法的概述:
- createIndex(字符串索引):使用给定的名称创建一个索引。
- existIndex(字符串索引):检查是否存在具有给定名称的索引。
- deleteIndex(字符串索引):删除具有给定名称的索引。
- addDocument(动态动态,字符串索引):使用给定的名称将文档添加到索引中。
- existDocument(字符串索引,字符串文档):检查具有给定ID的文档是否存在于具有给定名称的索引中。
- getDocument(字符串索引,字符串文档):从具有给定名称的索引中检索具有给定ID的文档。
- updateDocument(动态动态、字符串索引、字符串文档):在具有给定名称的索引中更新具有给定ID的文档。
- deleteDocument(字符串索引,字符串文档):从具有给定名称的索引中删除具有给定ID的文档。
- bulkAddDocument(List<Dynamic>dynamics):在一个批次中将多个具有给定名称的文档添加到索引中。
- searchDocument(字符串索引):根据搜索查询在索引中搜索具有给定名称的文档。
import com.alibaba.fastjson.JSON;
import com.wangfugui.apprentice.dao.domain.Dynamic;
import lombok.extern.slf4j.Slf4j;
import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest;
import org.elasticsearch.action.bulk.BulkRequest;
import org.elasticsearch.action.bulk.BulkResponse;
import org.elasticsearch.action.delete.DeleteRequest;
import org.elasticsearch.action.delete.DeleteResponse;
import org.elasticsearch.action.get.GetRequest;
import org.elasticsearch.action.get.GetResponse;
import org.elasticsearch.action.index.IndexRequest;
import org.elasticsearch.action.index.IndexResponse;
import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.action.support.master.AcknowledgedResponse;
import org.elasticsearch.action.update.UpdateRequest;
import org.elasticsearch.action.update.UpdateResponse;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.client.indices.CreateIndexRequest;
import org.elasticsearch.client.indices.CreateIndexResponse;
import org.elasticsearch.client.indices.GetIndexRequest;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.index.query.TermQueryBuilder;
import org.elasticsearch.rest.RestStatus;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;import java.io.IOException;
import java.util.List;
import java.util.concurrent.TimeUnit;/*** @since JDK 1.8.0*/
@Component
@Slf4j
public class ElasticSearchUtil {@Autowired@Qualifier("restHighLevelClient")private RestHighLevelClient client;//索引的创建public CreateIndexResponse createIndex(String index) throws IOException {//1.创建索引的请求CreateIndexRequest request = new CreateIndexRequest(index);//2客户端执行请求,请求后获得响应CreateIndexResponse response = client.indices().create(request, RequestOptions.DEFAULT);log.info("索引的创建{}", response);return response;}//索引是否存在public Boolean existIndex(String index) throws IOException {//1.创建索引的请求GetIndexRequest request = new GetIndexRequest(index);//2客户端执行请求,请求后获得响应boolean exist = client.indices().exists(request, RequestOptions.DEFAULT);log.info("索引是否存在-----" + exist);return exist;}//删除索引public Boolean deleteIndex(String index) throws IOException {DeleteIndexRequest request = new DeleteIndexRequest(index);AcknowledgedResponse delete = client.indices().delete(request, RequestOptions.DEFAULT);log.info("删除索引--------" + delete.isAcknowledged());return delete.isAcknowledged();}//添加文档public IndexResponse addDocument(Dynamic dynamic, String index) throws IOException {IndexRequest request = new IndexRequest(index);//设置超时时间request.timeout("1s");//将数据放到json字符串request.source(JSON.toJSONString(dynamic), XContentType.JSON);//发送请求IndexResponse response = client.index(request, RequestOptions.DEFAULT);log.info("添加文档-------" + response.toString());log.info("添加文档-------" + response.status());return response;}//文档是否存在public Boolean existDocument(String index, String documents) throws IOException {//文档的 没有indexGetRequest request = new GetRequest(index, documents);//没有indices()了boolean exist = client.exists(request, RequestOptions.DEFAULT);log.info("文档是否存在-----" + exist);return exist;}//获取文档public GetResponse getDocument(String index, String documents) throws IOException {GetRequest request = new GetRequest(index, documents);GetResponse response = client.get(request, RequestOptions.DEFAULT);log.info("获取文档-----" + response.getSourceAsString());log.info("获取文档-----" + response);return response;}//修改文档public UpdateResponse updateDocument(Dynamic dynamic, String index, String documents) throws IOException {//修改是id为1的UpdateRequest request = new UpdateRequest(index, documents);request.timeout("1s");request.doc(JSON.toJSONString(dynamic), XContentType.JSON);UpdateResponse response = client.update(request, RequestOptions.DEFAULT);log.info("修改文档-----" + response);log.info("修改文档-----" + response.status());return response;}//删除文档public RestStatus deleteDocument(String index, String documents) throws IOException {DeleteRequest request = new DeleteRequest(index, documents);request.timeout("1s");DeleteResponse response = client.delete(request, RequestOptions.DEFAULT);log.info("删除文档------" + response.status());return response.status();}//批量添加文档public BulkResponse bulkAddDocument(List<Dynamic> dynamics) throws IOException {//批量操作的RequestBulkRequest request = new BulkRequest();request.timeout("1s");//批量处理请求for (int i = 0; i < dynamics.size(); i++) {request.add(new IndexRequest("lisen_index").id("" + (i + 1)).source(JSON.toJSONString(dynamics.get(i)), XContentType.JSON));}BulkResponse response = client.bulk(request, RequestOptions.DEFAULT);//response.hasFailures()是否是失败的log.info("批量添加文档-----" + response.hasFailures());// 结果:false为成功 true为失败return response;}//查询文档public SearchResponse searchDocument(String index) throws IOException {SearchRequest request = new SearchRequest(index);//构建搜索条件SearchSourceBuilder sourceBuilder = new SearchSourceBuilder();//设置了高亮sourceBuilder.highlighter();//term name为cyx1的TermQueryBuilder termQueryBuilder = QueryBuilders.termQuery("name", "cyx1");sourceBuilder.query(termQueryBuilder);sourceBuilder.timeout(new TimeValue(60, TimeUnit.SECONDS));request.source(sourceBuilder);SearchResponse response = client.search(request, RequestOptions.DEFAULT);log.info("查询文档-----" + JSON.toJSONString(response.getHits()));log.info("=====================");for (SearchHit documentFields : response.getHits().getHits()) {log.info("查询文档--遍历参数--" + documentFields.getSourceAsMap());}return response;}public IndexResponse addDocumentId(Dynamic dynamic, String index, String id) throws IOException {IndexRequest request = new IndexRequest(index);//设置超时时间request.id(id);//将数据放到json字符串request.source(JSON.toJSONString(dynamic), XContentType.JSON);//发送请求IndexResponse response = client.index(request, RequestOptions.DEFAULT);log.info("添加文档-------" + response.toString());log.info("添加文档-------" + response.status());return response;}
}
第五步,编写controller类
这是一个Java类,实现了Elasticsearch API的一些基本功能。它定义了用于创建、检查存在性、删除索引、添加、修改和删除文档,以及搜索文档的方法。该类使用Elasticsearch API的RESTful客户端执行这些操作。
以下是每个方法的概述:
- createIndex(String index) 创建索引的方法。
- existIndex(String index) 检查给定名称的索引是否存在的方法。
- deleteIndex(String index) 删除给定名称的索引的方法。
- addDocument(Dynamic dynamic, String index) 将文档添加到给定名称的索引的方法。
- existDocument(String index, String documents) 检查给定名称的索引中是否存在具有给定ID的文档的方法。
- getDocument(String index, String documents) 从给定名称的索引中检索具有给定ID的文档的方法。
- updateDocument(Dynamic dynamic, String index, String documents) 在给定名称的索引中更新具有给定ID的文档的方法。
- deleteDocument(String index, String documents) 从给定名称的索引中删除具有给定ID的文档的方法。
- bulkAddDocument(List dynamics) 在单个批处理中将多个文档添加到给定名称的索引的方法。
- searchDocument(String index) 基于搜索查询在给定名称的索引中搜索文档的方法。
import com.wangfugui.apprentice.common.util.ElasticSearchUtil;
import com.wangfugui.apprentice.common.util.ResponseUtils;
import com.wangfugui.apprentice.dao.domain.Dynamic;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;import java.io.IOException;
import java.util.List;/*** @since JDK 1.8.0*/
@RestController
@RequestMapping("/elasticSearch")
@Api(tags = "elasticSearch操作")
public class ElasticSearchController {@Autowiredprivate ElasticSearchUtil elasticSearchUtil;/**索引的创建*/@PostMapping("/createIndex")@ApiOperation("索引的创建")public ResponseUtils createIndex(@RequestParam String index) throws IOException {return ResponseUtils.success(elasticSearchUtil.createIndex(index));}/**索引是否存在*/@GetMapping("/existIndex")@ApiOperation("索引是否存在")public ResponseUtils existIndex(@RequestParam String index) throws IOException {return ResponseUtils.success(elasticSearchUtil.existIndex(index));}/**删除索引*/@DeleteMapping("/deleteIndex")@ApiOperation("删除索引")public ResponseUtils deleteIndex(@RequestParam String index) throws IOException {return ResponseUtils.success(elasticSearchUtil.deleteIndex(index));}/**添加文档*/@PostMapping("/addDocument")@ApiOperation("添加文档随机id")public ResponseUtils addDocument(@RequestBody Dynamic dynamic, @RequestParam String index) throws IOException {return ResponseUtils.success(elasticSearchUtil.addDocument(dynamic,index));}/**添加文档*/@PostMapping("/addDocument")@ApiOperation("添加文档自定义id")public ResponseUtils addDocumentId(@RequestBody Dynamic dynamic, @RequestParam String index,@RequestParam String id) throws IOException {return ResponseUtils.success(elasticSearchUtil.addDocumentId(dynamic,index,id));}/**文档是否存在*/@GetMapping("/existDocument")@ApiOperation("文档是否存在")public ResponseUtils existDocument(@RequestParam String index, @RequestParam String documents) throws IOException {return ResponseUtils.success(elasticSearchUtil.existDocument(index,documents));}/**获取文档*/@GetMapping("/getDocument")@ApiOperation("获取文档")public ResponseUtils getDocument(@RequestParam String index, @RequestParam String documents) throws IOException {return ResponseUtils.success(elasticSearchUtil.getDocument(index,documents));}/**修改文档*/@ApiOperation("修改文档")@PutMapping("/updateDocument")public ResponseUtils updateDocument(@RequestBody Dynamic dynamic, @RequestParam String index, @RequestParam String documents) throws IOException {return ResponseUtils.success(elasticSearchUtil.updateDocument(dynamic,index,documents));}/**删除文档*/@ApiOperation("删除文档")@DeleteMapping("/deleteDocument")public ResponseUtils deleteDocument(@RequestParam String index, @RequestParam String documents) throws IOException {return ResponseUtils.success(elasticSearchUtil.deleteDocument(index,documents));}/**批量添加文档*/@ApiOperation("批量添加文档")@PostMapping("/bulkAddDocument")public ResponseUtils bulkAddDocument(@RequestBody List<Dynamic> dynamics) throws IOException {return ResponseUtils.success(elasticSearchUtil.bulkAddDocument(dynamics));}/**查询文档*/@ApiOperation("查询文档")@GetMapping("/searchDocument")public ResponseUtils searchDocument(@RequestParam String index) throws IOException {return ResponseUtils.success(elasticSearchUtil.searchDocument(index));}}
第六步,测试即可
成功!!
相关文章:

【SpringBoot】SpringBoot集成ElasticSearch
文章目录 第一步,导入jar包,注意这里的jar包版本可能和你导入的不一致,所以需要修改第二步,编写配置类第三步,填写yml第四步,编写util类第五步,编写controller类第六步,测试即可 第一…...

从 Elasticsearch 到 Apache Doris,10 倍性价比的新一代日志存储分析平台
作者介绍:肖康,SelectDB 技术副总裁 导语 日志数据的处理与分析是最典型的大数据分析场景之一,过去业内以 Elasticsearch 和 Grafana Loki 为代表的两类架构难以同时兼顾高吞吐实时写入、低成本海量存储、实时文本检索的需求。Apache Doris…...

探讨Redis缓存问题及解决方案:缓存穿透、缓存击穿、缓存雪崩与缓存预热(如何解决Redis缓存中的常见问题并提高应用性能)
Redis是一种非常流行的开源缓存系统,用于缓存数据以提高应用程序性能。但是,如果我们不注意一些缓存问题,Redis也可能会导致一些性能问题。在本文中,我们将探讨Redis中的一些常见缓存问题,并提供解决方案。 一、缓存穿…...
【Python】怎么在pip下载的时候设置镜像?(常见的清华镜像、阿里云镜像以及中科大镜像)
一、清华镜像 在使用 pip 命令下载 Python 包时,可以通过设置 pip 的镜像源为清华镜像来加快下载速度。 以下是如何设置清华镜像源的步骤: 打开终端或命令行窗口执行以下命令添加清华镜像源: pip config set global.index-url https://py…...

【AI面试】目标检测中one-stage、two-stage算法的内容和优缺点对比汇总
在深度学习领域中,图像分类,目标检测和目标分割是三个相对来说较为基础的任务了。再加上图像生成(GAN,VAE,扩散模型),keypoints关键点检测等等,基本上涵盖了图像领域大部分场景了。 …...

stack、queue和priority_queue的使用介绍--C++
目录 一、stack介绍 使用方法 二、queue介绍 queue的使用 三、priority_queeue 优先级队列介绍 一、stack介绍 1. stack是一种容器适配器,专门用在具有后进先出操作的上下文环境中,其删除只能从容器的一端进行元素的插入与提取操作。 2. stack是作为容器…...
python遍历数组
在Python中,有多种方式可以遍历数组,以下是其中的几种方式: 1. 使用for循环: my_list [1, 2, 3, 4, 5] for x in my_list: print(x) 2. 使用while循环和索引: my_list [1, 2, 3, 4, 5] i 0 while i < len(m…...

红黑树理论详解与Java实现
文章目录 基本定义五大性质红黑树和2-3-4树的关系红黑树和2-3-4树各结点对应关系添加结点到红黑树注意事项添加的所有情况 添加导致不平衡叔父节点不是红色节点(祖父节点为红色)添加不平衡LL/RR添加不平衡LR/RL 叔父节点是红色节点(祖父节点为…...
container的讲解
我们做开发经常会遇到这样的一个需求,要开发一个响应式的网站,但是我们需要我们的元素样式跟随着我们的元素尺寸大小变化而变化。而我们常用的媒体查询(Media Queries)检测的是视窗的宽高,根本无法满足我们的业务需求&…...

JavaScript 箭头函数
(许多人所谓的成熟,不过是被习俗磨去了棱角,变得世故而实际了。那不是成熟,而是精神的早衰和个性的消亡。真正的成熟,应当是独特个性的形成,真实自我的发现,精神上的结果和丰收。——周国平&…...

简单理解Transformer注意力机制
这篇文章是对《动手深度学习》注意力机制部分的简单理解。 生物学中的注意力 生物学上的注意力有两种,一种是无意识的,零一种是有意识的。如下图1,由于红色的杯子比较突出,因此注意力不由自主指向了它。如下图2,由于…...
Vue3面试题:20道含答案和代码示例的练习题
Vue3中响应式数据的实现原理是什么? 答:Vue3中使用Proxy对象来实现响应式数据。当数据发生变化时,Proxy会自动触发更新。 const state {count: 0 }const reactiveState new Proxy(state, {set(target, key, value) {target[key] valueco…...
Oracle数据库创建用户
文章目录 1 查看当前连接的容器2 查看pdb下库的信息3 将连接改到XEPDB1下,并查看当前连接4 创建表空间5 创建用户6 用户赋权7 删除表空间、用户7.1 删除表空间7.2 删除用户 8 CDB与PDB的概念 1 查看当前连接的容器 SQL> show con_name;CON_NAME ---------------…...
互联网摸鱼日报(2023-04-30)
互联网摸鱼日报(2023-04-30) InfoQ 热门话题 被ChatGPT带火的大模型,如何实际在各行业落地? Service Mesh的未来在于网络 百度 Prometheus 大规模业务监控实战 软件技术栈商品化:应用优先的云服务如何改变游戏规则…...
第二章--第一节--什么是语言生成
一、什么是语言生成 1.1. 说明语言生成的概念及重要性 语言生成是指使用计算机程序来生成符合人类自然语言规范的文本的过程。它是自然语言处理(NLP)领域中的一个重要分支,涉及到语言学、计算机科学和人工智能等领域的交叉应用。语言生成技术可以被广泛地应用于自动问答系…...
HTML <!--...--> 标签
实例 HTML 注释: <!--这是一段注释。注释不会在浏览器中显示。--><p>这是一段普通的段落。</p>浏览器支持 元素ChromeIEFirefoxSafariOpera<!--...-->YesYesYesYesYes 所有浏览器都支持注释标签。 定义和用法 注释标签用于在源代码中…...

TinyML:使用 ChatGPT 和合成数据进行婴儿哭声检测
故事 TinyML 是机器学习的一个领域,专注于将人工智能的力量带给低功耗设备。该技术对于需要实时处理的应用程序特别有用。在机器学习领域,目前在定位和收集数据集方面存在挑战。然而,使用合成数据可以以一种既具有成本效益又具有适应性的方式训练 ML 模型,从而消除了对大量…...

JavaScript中的Concurrency并发:异步操作下的汉堡制作示例
这篇文章想讲一下JavaScript中同步与异步操作在一个简单的示例中的应用。我们将以制作汉堡为例,展示如何使用同步方法、回调函数(callbacks)和Promise与async/await来实现该过程。 Let’s imagine we’re trying to make a burger: 1. Get …...

微信小程序开发一个多少钱
小程序开发是当前比较流行的一项技术服务,能够为企业和个人带来巨大的商业价值和社会价值,但是小程序开发费用也是潜在的成本之一。在选择小程序开发服务时,了解开发费用如何计算、影响价格的因素以及如何降低成本等方面的知识,可…...

Python基础入门(2)—— 什么是控制语句、列表、元组和序列?
文章目录 01 | 🚄控制语句02 | 🚅列表03 | 🚈元组04 | 🚝序列05 | 🚞习题 A bold attempt is half success. 勇敢的尝试是成功的一半。 前面学习了Python的基本原则、变量、字符串、运算符和数据类型等知识,…...
KubeSphere 容器平台高可用:环境搭建与可视化操作指南
Linux_k8s篇 欢迎来到Linux的世界,看笔记好好学多敲多打,每个人都是大神! 题目:KubeSphere 容器平台高可用:环境搭建与可视化操作指南 版本号: 1.0,0 作者: 老王要学习 日期: 2025.06.05 适用环境: Ubuntu22 文档说…...
Python爬虫实战:研究MechanicalSoup库相关技术
一、MechanicalSoup 库概述 1.1 库简介 MechanicalSoup 是一个 Python 库,专为自动化交互网站而设计。它结合了 requests 的 HTTP 请求能力和 BeautifulSoup 的 HTML 解析能力,提供了直观的 API,让我们可以像人类用户一样浏览网页、填写表单和提交请求。 1.2 主要功能特点…...
vscode里如何用git
打开vs终端执行如下: 1 初始化 Git 仓库(如果尚未初始化) git init 2 添加文件到 Git 仓库 git add . 3 使用 git commit 命令来提交你的更改。确保在提交时加上一个有用的消息。 git commit -m "备注信息" 4 …...
DeepSeek 赋能智慧能源:微电网优化调度的智能革新路径
目录 一、智慧能源微电网优化调度概述1.1 智慧能源微电网概念1.2 优化调度的重要性1.3 目前面临的挑战 二、DeepSeek 技术探秘2.1 DeepSeek 技术原理2.2 DeepSeek 独特优势2.3 DeepSeek 在 AI 领域地位 三、DeepSeek 在微电网优化调度中的应用剖析3.1 数据处理与分析3.2 预测与…...

Xshell远程连接Kali(默认 | 私钥)Note版
前言:xshell远程连接,私钥连接和常规默认连接 任务一 开启ssh服务 service ssh status //查看ssh服务状态 service ssh start //开启ssh服务 update-rc.d ssh enable //开启自启动ssh服务 任务二 修改配置文件 vi /etc/ssh/ssh_config //第一…...

云启出海,智联未来|阿里云网络「企业出海」系列客户沙龙上海站圆满落地
借阿里云中企出海大会的东风,以**「云启出海,智联未来|打造安全可靠的出海云网络引擎」为主题的阿里云企业出海客户沙龙云网络&安全专场于5.28日下午在上海顺利举办,现场吸引了来自携程、小红书、米哈游、哔哩哔哩、波克城市、…...

循环冗余码校验CRC码 算法步骤+详细实例计算
通信过程:(白话解释) 我们将原始待发送的消息称为 M M M,依据发送接收消息双方约定的生成多项式 G ( x ) G(x) G(x)(意思就是 G ( x ) G(x) G(x) 是已知的)࿰…...

【网络安全产品大调研系列】2. 体验漏洞扫描
前言 2023 年漏洞扫描服务市场规模预计为 3.06(十亿美元)。漏洞扫描服务市场行业预计将从 2024 年的 3.48(十亿美元)增长到 2032 年的 9.54(十亿美元)。预测期内漏洞扫描服务市场 CAGR(增长率&…...

ETLCloud可能遇到的问题有哪些?常见坑位解析
数据集成平台ETLCloud,主要用于支持数据的抽取(Extract)、转换(Transform)和加载(Load)过程。提供了一个简洁直观的界面,以便用户可以在不同的数据源之间轻松地进行数据迁移和转换。…...

Springcloud:Eureka 高可用集群搭建实战(服务注册与发现的底层原理与避坑指南)
引言:为什么 Eureka 依然是存量系统的核心? 尽管 Nacos 等新注册中心崛起,但金融、电力等保守行业仍有大量系统运行在 Eureka 上。理解其高可用设计与自我保护机制,是保障分布式系统稳定的必修课。本文将手把手带你搭建生产级 Eur…...