当前位置: 首页 > 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…...

Chapter03-Authentication vulnerabilities

文章目录 1. 身份验证简介1.1 What is authentication1.2 difference between authentication and authorization1.3 身份验证机制失效的原因1.4 身份验证机制失效的影响 2. 基于登录功能的漏洞2.1 密码爆破2.2 用户名枚举2.3 有缺陷的暴力破解防护2.3.1 如果用户登录尝试失败次…...

日语AI面试高效通关秘籍:专业解读与青柚面试智能助攻

在如今就业市场竞争日益激烈的背景下&#xff0c;越来越多的求职者将目光投向了日本及中日双语岗位。但是&#xff0c;一场日语面试往往让许多人感到步履维艰。你是否也曾因为面试官抛出的“刁钻问题”而心生畏惧&#xff1f;面对生疏的日语交流环境&#xff0c;即便提前恶补了…...

调用支付宝接口响应40004 SYSTEM_ERROR问题排查

在对接支付宝API的时候&#xff0c;遇到了一些问题&#xff0c;记录一下排查过程。 Body:{"datadigital_fincloud_generalsaas_face_certify_initialize_response":{"msg":"Business Failed","code":"40004","sub_msg…...

python打卡day49

知识点回顾&#xff1a; 通道注意力模块复习空间注意力模块CBAM的定义 作业&#xff1a;尝试对今天的模型检查参数数目&#xff0c;并用tensorboard查看训练过程 import torch import torch.nn as nn# 定义通道注意力 class ChannelAttention(nn.Module):def __init__(self,…...

ubuntu搭建nfs服务centos挂载访问

在Ubuntu上设置NFS服务器 在Ubuntu上&#xff0c;你可以使用apt包管理器来安装NFS服务器。打开终端并运行&#xff1a; sudo apt update sudo apt install nfs-kernel-server创建共享目录 创建一个目录用于共享&#xff0c;例如/shared&#xff1a; sudo mkdir /shared sud…...

AI Agent与Agentic AI:原理、应用、挑战与未来展望

文章目录 一、引言二、AI Agent与Agentic AI的兴起2.1 技术契机与生态成熟2.2 Agent的定义与特征2.3 Agent的发展历程 三、AI Agent的核心技术栈解密3.1 感知模块代码示例&#xff1a;使用Python和OpenCV进行图像识别 3.2 认知与决策模块代码示例&#xff1a;使用OpenAI GPT-3进…...

Day131 | 灵神 | 回溯算法 | 子集型 子集

Day131 | 灵神 | 回溯算法 | 子集型 子集 78.子集 78. 子集 - 力扣&#xff08;LeetCode&#xff09; 思路&#xff1a; 笔者写过很多次这道题了&#xff0c;不想写题解了&#xff0c;大家看灵神讲解吧 回溯算法套路①子集型回溯【基础算法精讲 14】_哔哩哔哩_bilibili 完…...

【大模型RAG】Docker 一键部署 Milvus 完整攻略

本文概要 Milvus 2.5 Stand-alone 版可通过 Docker 在几分钟内完成安装&#xff1b;只需暴露 19530&#xff08;gRPC&#xff09;与 9091&#xff08;HTTP/WebUI&#xff09;两个端口&#xff0c;即可让本地电脑通过 PyMilvus 或浏览器访问远程 Linux 服务器上的 Milvus。下面…...

定时器任务——若依源码分析

分析util包下面的工具类schedule utils&#xff1a; ScheduleUtils 是若依中用于与 Quartz 框架交互的工具类&#xff0c;封装了定时任务的 创建、更新、暂停、删除等核心逻辑。 createScheduleJob createScheduleJob 用于将任务注册到 Quartz&#xff0c;先构建任务的 JobD…...

376. Wiggle Subsequence

376. Wiggle Subsequence 代码 class Solution { public:int wiggleMaxLength(vector<int>& nums) {int n nums.size();int res 1;int prediff 0;int curdiff 0;for(int i 0;i < n-1;i){curdiff nums[i1] - nums[i];if( (prediff > 0 && curdif…...