当前位置: 首页 > news >正文

SSM框架(五):Maven进阶

文章目录

  • 一、分模块开发
    • 1.1 分模块开发的意义
    • 1.2 步骤
  • 二、依赖管理
    • 2.1 依赖传递
    • 2.2 可选依赖和排除依赖
  • 三、继承与聚合
    • 3.1 聚合
    • 3.2 继承
    • 3.3 聚合和继承区别
  • 四、属性
    • 4.1 pom文件的依赖使用属性
    • 4.2 资源文件使用属性
  • 五、多环境开发
  • 六、跳过测试
  • 七、私服
    • 7.1 下载与使用
    • 7.2 私服仓库分类
    • 7.3 私服的本地配置与上传文件
  • 八、案例演示


一、分模块开发

1.1 分模块开发的意义

在这里插入图片描述

1.2 步骤

  1. 首先将com.itheima.domain模块拆出来,建立一个新的模块maven_03
  2. 然后在maven_02中的pom文件中引入maven_03的依赖
  3. 将maven_03通过install打包成jar包
  4. 通过maven_02的compile进行编译校验
  5. 最后运行程序是否成功
    在这里插入图片描述

二、依赖管理

2.1 依赖传递

在这里插入图片描述
在这里插入图片描述

2.2 可选依赖和排除依赖

可选依赖是自己用的依赖可以设置为是否给其他人用,解释:这里的optional设置为true表示maven_03_pojo依赖只能自己用,不能被其他人用
在这里插入图片描述

排除依赖是不想用 引用的这个依赖 的下一级依赖,解释:exclusions表示不想用maven_04_dao下的log4j和mybatis依赖

在这里插入图片描述

三、继承与聚合

3.1 聚合

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

3.2 继承

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

3.3 聚合和继承区别

在这里插入图片描述

父模块

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"><modelVersion>4.0.0</modelVersion><groupId>org.example</groupId><artifactId>maven_01_parent</artifactId><packaging>pom</packaging><version>1.0-SNAPSHOT</version><!-- 设置聚合工程的子模块:统一管理子模块--><modules><module>../maven_02_ssm</module><module>../maven_03_pojo</module></modules><!-- 父工程的依赖--><dependencies><dependency><groupId>org.springframework</groupId><artifactId>spring-webmvc</artifactId><version>5.2.10.RELEASE</version></dependency></dependencies><!--    定义依赖管理: 子依赖可选择使用--><dependencyManagement><dependencies><dependency><groupId>junit</groupId><artifactId>junit</artifactId><version>4.12</version><scope>test</scope></dependency></dependencies></dependencyManagement></project>

子模块

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"><modelVersion>4.0.0</modelVersion><groupId>org.example</groupId><artifactId>maven_02_ssm</artifactId><packaging>war</packaging><version>1.0-SNAPSHOT</version><name>maven_02_ssm Maven Webapp</name><url>http://maven.apache.org</url><!--  配置当前工程继承parent父工程--><parent><groupId>org.example</groupId><artifactId>maven_01_parent</artifactId><version>1.0-SNAPSHOT</version><!--  parent父工程pom文件的位置--><relativePath>../maven_01_parent/pom.xml</relativePath></parent><dependencies><dependency><groupId>org.example</groupId><artifactId>maven_03_pojo</artifactId><version>1.0-SNAPSHOT</version><!-- 设置可选依赖:true表示仅自己使用,其他人无法使用 --><optional>false</optional><!-- 设置排除依赖:表示不想使用maven_03_pojo依赖下的mybatis依赖 --><exclusions><exclusion><groupId>org.mybatis</groupId><artifactId>mybatis</artifactId></exclusion></exclusions></dependency><!-- 继承父类的依赖,不用写版本号,父类已写好--><dependency><groupId>junit</groupId><artifactId>junit</artifactId><scope>test</scope></dependency></dependencies><build><finalName>maven_02_ssm</finalName><plugins><plugin><groupId>org.apache.tomcat.maven</groupId><artifactId>tomcat7-maven-plugin</artifactId><version>2.1</version><configuration><port>80</port><path>/</path></configuration></plugin></plugins></build>
</project>

四、属性

在这里插入图片描述

在这里插入图片描述

4.1 pom文件的依赖使用属性

在这里插入图片描述
在这里插入图片描述

4.2 资源文件使用属性

这里使用pom.xml文件配置src/mian/resourses下的jdbc.properties文件的属性,即使用pom文件配置连接数据库需要的参数
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

五、多环境开发

Maven提供配置多种环境的设定,帮助开发者使用过程中快速切换环境
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
一定要注意:mvn 命令要在指定模块下运行,不然找不到环境
在这里插入图片描述

六、跳过测试

应用场景:功能未开发完、快速打包…
方式一:
在这里插入图片描述
方式二:
在这里插入图片描述
方式三:
在这里插入图片描述

七、私服

7.1 下载与使用

Nexus下载地址:https://help.sonatype.com/repomanager3/download
在这里插入图片描述

下载解压后会有nexus-3.30.1-01和sonatype-work文件夹,在nexus-3.30.1-01\bin目录下打开cmd输入指令nexus.exe /run nexus启动服务器
在这里插入图片描述

7.2 私服仓库分类

在这里插入图片描述

7.3 私服的本地配置与上传文件

第一步:建立两个maven2仓库,并且在maven-public里面将建好的两个仓库交给其管理,记得点击save保存

在这里插入图片描述
在这里插入图片描述

第二步:在本地的maven的setting.xml(apache-maven-3.3.9\conf下)文件中配置,访问私服的仓库的用户名和密码

在这里插入图片描述

同样在setting.xml中配置私服的地址,圈红部分改为maven-public

在这里插入图片描述

第三步:在父工程的pom文件中

在这里插入图片描述

最后,可以看到私有仓库itheima-release已经上传了文件

在这里插入图片描述

注意:可以修改pom.xml文件的version版本为release(发布版本)或snapshot(快照版本)格式,指定放在私服的哪个仓库中

在这里插入图片描述

其次:想要配置访问中央服务器的地址,这里可以改为阿里的

在这里插入图片描述

八、案例演示

父工程maven_01_parent

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"><modelVersion>4.0.0</modelVersion><groupId>org.example</groupId><artifactId>maven_01_parent</artifactId><packaging>pom</packaging><version>1.0-SNAPSHOT</version><!-- 3.设置聚合工程的子模块:统一管理子模块--><modules><module>../maven_02_ssm</module><module>../maven_03_pojo</module></modules><!-- 4.父工程的依赖--><dependencies><dependency><groupId>org.springframework</groupId><artifactId>spring-webmvc</artifactId><!--    9.使用属性  --><version>${Spring.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-jdbc</artifactId><version>${Spring.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-test</artifactId><version>${Spring.version}</version></dependency><dependency><groupId>org.mybatis</groupId><artifactId>mybatis</artifactId><version>3.5.6</version></dependency><dependency><groupId>org.mybatis</groupId><artifactId>mybatis-spring</artifactId><version>1.3.0</version></dependency><dependency><groupId>mysql</groupId><artifactId>mysql-connector-java</artifactId><version>5.1.47</version></dependency><dependency><groupId>com.alibaba</groupId><artifactId>druid</artifactId><version>1.1.16</version></dependency><dependency><groupId>javax.servlet</groupId><artifactId>javax.servlet-api</artifactId><version>3.1.0</version><scope>provided</scope></dependency><dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-databind</artifactId><version>2.9.0</version></dependency></dependencies><!--    6.定义依赖管理: 子依赖可选择使用--><dependencyManagement><dependencies><dependency><groupId>junit</groupId><artifactId>junit</artifactId><version>${junit.version}</version><scope>test</scope></dependency></dependencies></dependencyManagement><!--    8.定义属性  --><properties><Spring.version>5.2.10.RELEASE</Spring.version><junit.version>4.12</junit.version><jdbc.username>root</jdbc.username></properties><build><!--10.配置指定目录下的文件也能使用上面的属性--><resources><!--设置资源目录,并设置能够解析${}--><resource><!-- <directory>../maven_02_ssm/src/main/resources</directory>--><!-- <directory>../maven_03_pojo/src/main/resources</directory>--><!-- 上述可以简化成${project.basedir}--><directory>${project.basedir}/src/main/resources</directory><filtering>true</filtering><includes><include>**/*.properties</include><include>**/*.xml</include></includes></resource></resources><plugins><!--13.跳过测试--><plugin><artifactId>maven-surefire-plugin</artifactId><version>2.12.4</version><configuration><!--true表示跳过所有测试--><skipTests>false</skipTests><!--排除掉不参与测试的内容--><excludes><exclude>**/BookServiceTest.java</exclude></excludes></configuration></plugin></plugins></build><!--12.配置多环境--><profiles><!--开发环境--><profile><id>env_dep</id><properties><jdbc.url>jdbc:mysql://127.1.1.1:3306/ssm_db</jdbc.url></properties><!--设定是否为默认启动环境--><activation><activeByDefault>true</activeByDefault></activation></profile><!--生产环境--><profile><id>env_pro</id><properties><jdbc.url>jdbc:mysql://127.2.2.2:3306/ssm_db</jdbc.url></properties></profile><!--测试环境--><profile><id>env_test</id><properties><jdbc.url>jdbc:mysql://127.3.3.3:3306/ssm_db</jdbc.url></properties></profile></profiles><!--14.配置当前工程保存在私服中的具体位置--><distributionManagement><repository><id>itheima-Release</id><url>http://localhost:8081/repository/itheima-Release/</url></repository><snapshotRepository><id>itheima-Snapshot</id><url>http://localhost:8081/repository/itheima-Snapshot/</url></snapshotRepository></distributionManagement></project>

子工程maven_02_ssm

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"><modelVersion>4.0.0</modelVersion><groupId>org.example</groupId><artifactId>maven_02_ssm</artifactId><packaging>war</packaging><version>1.0-SNAPSHOT</version><name>maven_02_ssm Maven Webapp</name><url>http://maven.apache.org</url><!-- 5. 配置当前工程继承parent父工程--><parent><groupId>org.example</groupId><artifactId>maven_01_parent</artifactId><version>1.0-SNAPSHOT</version><!--  parent父工程pom文件的位置--><relativePath>../maven_01_parent/pom.xml</relativePath></parent><dependencies><dependency><groupId>org.example</groupId><artifactId>maven_03_pojo</artifactId><version>1.0-SNAPSHOT</version><!-- 1.设置可选依赖:true表示仅自己使用,其他人无法使用 --><optional>false</optional><!-- 2.设置排除依赖:表示不想使用maven_03_pojo依赖下的mybatis依赖 --><exclusions><exclusion><groupId>org.mybatis</groupId><artifactId>mybatis</artifactId></exclusion></exclusions></dependency><!-- 7.继承父类的依赖,不用写版本号,父类已写好--><dependency><groupId>junit</groupId><artifactId>junit</artifactId><scope>test</scope></dependency></dependencies><build><finalName>maven_02_ssm</finalName><plugins><plugin><groupId>org.apache.tomcat.maven</groupId><artifactId>tomcat7-maven-plugin</artifactId><version>2.1</version><configuration><port>80</port><path>/</path></configuration></plugin><!--11.打包时忽略检查web.xml文件--><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-war-plugin</artifactId><version>3.2.3</version><configuration><failOnMissingWebXml>false</failOnMissingWebXml></configuration></plugin></plugins></build>
</project>

子工程maven_03_pojo

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"><modelVersion>4.0.0</modelVersion><groupId>org.example</groupId><artifactId>maven_03_pojo</artifactId><packaging>jar</packaging><version>1.0-RELEASE</version><name>maven_03_pojo Maven Webapp</name><url>http://maven.apache.org</url><!--  5.配置当前工程继承parent父工程--><parent><groupId>org.example</groupId><artifactId>maven_01_parent</artifactId><version>1.0-SNAPSHOT</version><relativePath>../maven_01_parent/pom.xml</relativePath></parent><dependencies><dependency><groupId>junit</groupId><artifactId>junit</artifactId><scope>test</scope></dependency></dependencies><build><finalName>maven_03_pojo</finalName></build>
</project>

相关文章:

SSM框架(五):Maven进阶

文章目录 一、分模块开发1.1 分模块开发的意义1.2 步骤 二、依赖管理2.1 依赖传递2.2 可选依赖和排除依赖 三、继承与聚合3.1 聚合3.2 继承3.3 聚合和继承区别 四、属性4.1 pom文件的依赖使用属性4.2 资源文件使用属性 五、多环境开发六、跳过测试七、私服7.1 下载与使用7.2 私…...

【计算机视觉】基于OpenCV计算机视觉的摄像头测距技术设计与实现

基于计算机视觉的摄像头测距技术 文章目录 基于计算机视觉的摄像头测距技术导读引入技术实现原理技术实现细节Python-opencv实现方案获取目标轮廓步骤 1&#xff1a;图像处理步骤 2&#xff1a;找到轮廓步骤完整代码 计算图像距离前置技术背景与原理步骤 1&#xff1a;定义距离…...

Java项目实战《苍穹外卖》 四、Swagger接口文档

以铜为镜&#xff0c;可以正衣冠&#xff1b;以人为镜&#xff0c;可以明得失&#xff1b;以史为镜&#xff0c;可以知兴替。 - - - 李世民 系列文章目录 苍穹外卖是黑马程序员2023年的Java实战项目&#xff0c;作为业余练手用&#xff0c;需要源码或者课程的可以找我&#xff…...

深度学习——第03章 Python程序设计语言(3.1 Python语言基础)

无论是在机器学习还是深度学习中&#xff0c;Python已经成为主导性的编程语言。而且&#xff0c;现在许多主流的深度学习框架&#xff0c;例如PyTorch、TensorFlow也都是基于Python。本课程主要是围绕“理论实战”同时进行&#xff0c;所以本章将重点介绍深度学习中Python的必备…...

【人工智能Ⅰ】实验6:回归预测实验

实验6 回归预测实验 一、实验目的 1&#xff1a;了解机器学习中数据集的常用划分方法以及划分比例&#xff0c;并学习数据集划分后训练集、验证集及测试集的作用。 2&#xff1a;了解降维方法和回归模型的应用。 二、实验要求 数据集&#xff08;LUCAS.SOIL_corr-实验6数据…...

前端下载文件的方法-blob下载

前端经常会遇到下载文件的需求&#xff0c;后端一般提供的以下两种方法&#xff1a; 文件地址。后端直接提供要下载的文件地址&#xff0c;常用于图片、音视频等静态文件文件流。后端返回文件流&#xff0c;常用于excel等动态文件 一、a 标签下载 1、直接html使用a标签下载 …...

zookeeper+kafka+ELK+filebeat集群

目录 一、zookeeper概述&#xff1a; 1、zookeeper工作机制&#xff1a; 2、zookeeper主要作用&#xff1a; 3、zookeeper特性&#xff1a; 4、zookeeper的应用场景&#xff1a; 5、领导者和追随者&#xff1a;zookeeper的选举机制 二、zookeeper安装部署&#xff1a; 三…...

【LangChain实战】开源模型学习(2)-ChatGLM3

介绍 ChatGLM3 是智谱AI和清华大学 KEG 实验室联合发布的新一代对话预训练模型。ChatGLM3-6B 是 ChatGLM3 系列中的开源模型&#xff0c;在保留了前两代模型对话流畅、部署门槛低等众多优秀特性的基础上&#xff0c;ChatGLM3-6B 引入了如下特性&#xff1a; 更强大的基础模型&a…...

Python编程技巧 – 迭代器(Iterator)

Python编程技巧 – 迭代器(Iterator) By JacksonML Iterator(迭代器)是Python语言的核心概念之一。它常常与装饰器和生成器一道被人们提及&#xff0c;也是所有Python书籍需要涉及的部分。 本文简要介绍迭代器的功能以及实际的案例&#xff0c;希望对广大读者和学生有所帮助。…...

C语言练习题

C语言练习题 文章目录 C语言练习题题目一题目二题目三题目四题目五题目六题目八 题目一 #include <stdio.h> //VS2022,默认对齐数为8字节 union Un {short s[7];int n; };int main() {printf("%zd", sizeof(union Un));return 0; }代码运行结果:> 16 sizeo…...

常见的AI安全风险(数据投毒、后门攻击、对抗样本攻击、模型窃取攻击等)

文章目录 数据投毒&#xff08;Data Poisoning&#xff09;后门攻击&#xff08;Backdoor Attacks&#xff09;对抗样本攻击&#xff08;Adversarial Examples&#xff09;模型窃取攻击&#xff08;Model Extraction Attacks&#xff09;参考资料 数据投毒&#xff08;Data Poi…...

flutter开发实战-为ListView去除Android滑动波纹

flutter开发实战-为ListView去除Android滑动波纹 在之前的flutter聊天界面上&#xff0c;由于使用ScrollBehavior时候&#xff0c;当时忘记试试了&#xff0c;今天再试代码发现不对。这里重新记录一下为ListView去除Android滑动波纹的方式。 一、ScrollBehavior ScrollBehav…...

牛客在线编程(SQL大厂面试真题)

1.各个视频的平均完播率_牛客题霸_牛客网 ROP TABLE IF EXISTS tb_user_video_log, tb_video_info; CREATE TABLE tb_user_video_log (id INT PRIMARY KEY AUTO_INCREMENT COMMENT 自增ID,uid INT NOT NULL COMMENT 用户ID,video_id INT NOT NULL COMMENT 视频ID,start_time d…...

ubuntu下快速搭建docker环境训练yolov5数据集

参考文档 yolov5-github yolov5-github-训练文档 csdn训练博客 一、配置环境 1.1 安装依赖包 前往清华源官方地址 选择适合自己的版本替换自己的源 # 备份源文件 sudo cp /etc/apt/sources.list /etc/apt/sources.list_bak # 修改源文件 # 更新 sudo apt update &&a…...

SpringMVC常用注解和用法总结

目标&#xff1a; 1. 熟悉使用SpringMVC中的常用注解 目录 前言 1. Controller 2. RestController 3. RequestMapping 4. RequestParam 5. PathVariable 6. SessionAttributes 7. CookieValue 前言 SpringMVC是一款用于构建基于Java的Web应用程序的框架&#xff0c;它通…...

webpack如何处理css

一、准备工作 新建目录 添加样式 .word {color: red; } index.js添加dom元素&#xff0c;添加一个css word import ./css/index.css;const div document.createElement("div"); div.innerText "hello word!!!"; div.className "word"; do…...

IELTS学习笔记_grammar_新东方

参考&#xff1a; 新东方 田静 语法 目录&#xff1a; 导学简单句… x.1 导学 学语法以应用为主。 基础为&#xff1a;单词&#xff0c;语法 进阶为&#xff1a;听说读写译&#xff0c;只考听说读写。 words -> chunks -> sentences, chunks&#xff08;语块的重要…...

【计算机组成原理】存储器知识

目录 1、存储器分类 1.1、按存储介质分类 1.2、按存取方式分类 1.3、按信息的可改写性分类 1.4、按信息的可保存性分类 1.5、按功能和存取速度分类 2、存储器技术指标 2.1、存储容量 2.2、存取速度 3、存储系统层次结构 4、主存的基本结构 5、主存中数据的存放 5.…...

vscode配置代码片段

1.ctrl shift p 然后选择 Snippets:Configure User Snippets &#xff08;配置用户代码片段&#xff09; 2.选择vue或者vue.json 3.下面为json内容 { “vue-template”: { “prefix”: “modal-table”, “body”: [ “”, " <a-modal v-model:visible“visible” wi…...

vite脚手架,手写实现配置动态生成路由

参考文档 vite的glob-import vue路由配置基本都是重复的代码&#xff0c;每次都写一遍挺难受&#xff0c;加个页面就带配置下路由 那就利用 vite 的 文件系统处理啊 先看实现效果 1. 考虑怎么约定路由&#xff0c;即一个文件夹下&#xff0c;又有组件&#xff0c;又有页面&am…...

解决浏览器缓存问题

1.index.html文件meta标签添加属性 <meta name"viewport" content"widthdevice-width,initial-scale1.0, maximum-scale1.0, minimum-scale1.0, user-scalableno" viewport-fitcover >2.提前main.html处理逻辑再跳转到index.html页 <script>…...

【数据中台】开源项目(2)-Davinci可视应用平台

1 平台介绍 Davinci 是一个 DVaaS&#xff08;Data Visualization as a Service&#xff09;平台解决方案&#xff0c;面向业务人员/数据工程师/数据分析师/数据科学家&#xff0c;致力于提供一站式数据可视化解决方案。既可作为公有云/私有云独立部署使用&#xff0c;也可作为…...

Java实现简单飞翔小鸟游戏

一、创建新项目 首先创建一个新的项目&#xff0c;并命名为飞翔的鸟。 其次在飞翔的鸟项目下创建一个名为images的文件夹用来存放游戏相关图片。 用到的图片如下&#xff1a;0~7&#xff1a; bg&#xff1a; column&#xff1a; gameover&#xff1a; ground&#xff1a; st…...

numpy实现神经网络

numpy实现神经网络 首先讲述的是神经网络的参数初始化与训练步骤 随机初始化 任何优化算法都需要一些初始的参数。到目前为止我们都是初始所有参数为0&#xff0c;这样的初始方法对于逻辑回归来说是可行的&#xff0c;但是对于神经网络来说是不可行的。如果我们令所有的初始…...

Bean的加载控制

Bean的加载控制 文章目录 Bean的加载控制编程式注解式ConditionalOn*** 编程式 public class MyImportSelector implements ImportSelector {Overridepublic String[] selectImports(AnnotationMetadata annotationMetadata) {try {Class<?> clazz Class.forName("…...

使用 OpenCV 识别和裁剪黑白图像上的白色矩形--含源码

为了仅获取具有特定边框颜色的矩形,我寻求一种替代识别图像中的轮廓和所有矩形的传统方法。如示例图片所示,我有兴趣使用 opencv 仅获取白色边框矩形的坐标。任何这方面的建议将不胜感激。到目前为止,我的代码已产生如下所示的输出。我的下一个目标是将图像裁剪到大的中心框…...

LeetCode 每日一题 Day1

1094. 拼车 车上最初有 capacity 个空座位。车 只能 向一个方向行驶&#xff08;也就是说&#xff0c;不允许掉头或改变方向&#xff09; 给定整数 capacity 和一个数组 trips , trip[i] [numPassengersi, fromi, toi] 表示第 i 次旅行有 numPassengersi 乘客&#xff0c;接…...

【hacker送书活动第7期】Python网络爬虫入门到实战

第7期图书推荐 内容简介作者简介大咖推荐图书目录概述参与方式 内容简介 本书介绍了Python3网络爬虫的常见技术。首先介绍了网页的基础知识&#xff0c;然后介绍了urllib、Requests请求库以及XPath、Beautiful Soup等解析库&#xff0c;接着介绍了selenium对动态网站的爬取和S…...

【算法】希尔排序

目录 1. 说明2. 举个例子3. java代码示例4. java示例截图 1. 说明 1.希尔排序是直接插入排序的一种改进&#xff0c;其本质是一种分组插入排序 2.希尔排序采取了分组排序的方式 3.把待排序的数据元素序列按一定间隔进行分组&#xff0c;然后对每个分组进行直接插入排序 4.随着间…...

四、Zookeeper节点类型

目录 1、临时节点 2、永久节点 Znode有两种,分别为临时节点和永久节点。 节点的类型在创建时即被确定,并且不能改变。 1、临时节点 临时节点的生命周期依赖于创建它们的会话。一旦会话结束,临时节点将被自动删除,...