springboot多模块打包方式

news/2024/4/29 23:36:57/文章来源:https://blog.csdn.net/LSP522/article/details/132293714

明确子父模块结构

父目录是带modules
大致结构如下:

   <modules><module>ruoyi-admin</module><module>ruoyi-framework</module><module>ruoyi-system</module><module>ruoyi-quartz</module><module>ruoyi-generator</module><module>ruoyi-common</module><module>ruoyi-ems</module></modules><packaging>pom</packaging>

像打包出现这样的报错就是子模块打包方式使用了pom

Failure to find com.ruoyi:ruoyi-framework:jar:3.8.5 in https://maven.aliyun.com/repository/public was cached in the local repository, resolution will not be reattempted until the update interval of public has elapsed or updates are forced

应该使用jar的打包方式。

jar,war,pom的区别

JAR、WAR 和 POM 是 Java 开发中常见的三种文件类型,它们在项目构建和部署过程中起着不同的作用。

  1. JAR(Java Archive):JAR 文件是一种用于存储 Java 类、资源文件和库的归档文件格式。它通常用于打包和发布 Java 应用程序、库或模块。JAR 文件可以包含多个类文件和相关的资源文件,并且可以通过 Java 虚拟机(JVM)来运行。JAR 文件可以被其他 Java 项目依赖引用,使得代码复用和模块化开发更加方便。

  2. WAR(Web Application Archive):WAR 文件是一种用于打包和部署 Web 应用程序的归档文件格式。WAR 文件中包含了 Web 应用程序的 Java 类、资源文件、静态资源(如 HTML、CSS、JavaScript 文件)以及部署描述符(如 web.xml)。WAR 文件可以被部署到支持 Java Servlet 规范的 Web 容器(如 Tomcat、Jetty)中,并通过容器提供的 HTTP 服务来访问 Web 应用程序。

  3. POM(Project Object Model):POM 是 Maven 构建工具使用的 XML 文件,用于定义和管理项目的各种元数据和配置信息。POM 文件描述了项目的依赖关系、构建生命周期、插件配置、仓库信息等。它是 Maven 构建过程中的核心文件,通过读取和解析 POM 文件,Maven 可以自动化地执行编译、测试、打包、部署等操作。

总结:

  • JAR 是用于打包 Java 类和相关资源的归档文件格式,用于代码的发布和复用。
  • WAR 是用于打包和部署 Web 应用程序的归档文件格式,包含了 Web 相关的类、资源和描述符,用于 Web 应用的部署和访问。
  • POM 是 Maven 项目的配置文件,用于定义项目的元数据和构建配置,通过读取和解析 POM 文件,Maven 可以自动化地完成各种构建任务。

配置pom打包方式的意思是使用maven分模块管理,都会有一个父级项目,pom文件一个重要的属性就是packaging(打包类型),一般来说所有的父级项目的packaging都为pom,packaging默认类型jar类型,如果不做配置,maven会将该项目打成jar包。

子模块都是jar包
在这里插入图片描述
父模块是ruoyi,其它都是子模块。
有时需要按照顺序clean 和 install。我这里都配置好了,只要在父工程中install就行。然后就会获得一个target文件夹,里面有我们要的打包好的程序jar包

admin模块细节部分:
会有build部分

<build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><version>2.1.1.RELEASE</version><configuration><fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
<!--                    <mainClass>com.ruoyi.RuoYiApplication</mainClass>--></configuration><executions><execution><goals><goal>repackage</goal></goals></execution></executions></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-war-plugin</artifactId><version>3.1.0</version><configuration><failOnMissingWebXml>false</failOnMissingWebXml><warName>${project.artifactId}</warName></configuration></plugin></plugins><finalName>${project.artifactId}</finalName></build>

贴出所有的pom.xml文件吧
common的

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns="http://maven.apache.org/POM/4.0.0"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><parent><artifactId>ruoyi</artifactId><groupId>com.ruoyi</groupId><version>3.8.5</version>
<!--        <relativePath>../pom.xml</relativePath>--></parent><modelVersion>4.0.0</modelVersion><artifactId>ruoyi-common</artifactId><packaging>jar</packaging><description>common通用工具</description><dependencies><!-- Spring框架基本的核心工具 --><dependency><groupId>org.springframework</groupId><artifactId>spring-context-support</artifactId></dependency><!-- SpringWeb模块 --><dependency><groupId>org.springframework</groupId><artifactId>spring-web</artifactId></dependency><!-- spring security 安全认证 --><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-security</artifactId></dependency><!-- pagehelper 分页插件 --><dependency><groupId>com.github.pagehelper</groupId><artifactId>pagehelper-spring-boot-starter</artifactId></dependency><!-- 自定义验证注解 --><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-validation</artifactId></dependency><!--常用工具类 --><dependency><groupId>org.apache.commons</groupId><artifactId>commons-lang3</artifactId></dependency><!-- JSON工具类 --><dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-databind</artifactId></dependency><!-- 动态数据源 --><dependency><groupId>com.baomidou</groupId><artifactId>dynamic-datasource-spring-boot-starter</artifactId><version>3.5.2</version></dependency><!-- 阿里JSON解析器 --><dependency><groupId>com.alibaba.fastjson2</groupId><artifactId>fastjson2</artifactId></dependency><!-- io常用工具类 --><dependency><groupId>commons-io</groupId><artifactId>commons-io</artifactId></dependency><!-- excel工具 --><dependency><groupId>org.apache.poi</groupId><artifactId>poi-ooxml</artifactId></dependency><!-- yml解析器 --><dependency><groupId>org.yaml</groupId><artifactId>snakeyaml</artifactId></dependency><!-- Token生成与解析--><dependency><groupId>io.jsonwebtoken</groupId><artifactId>jjwt</artifactId></dependency><!-- Jaxb --><dependency><groupId>javax.xml.bind</groupId><artifactId>jaxb-api</artifactId></dependency><!-- redis 缓存操作 --><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-redis</artifactId></dependency><!-- pool 对象池 --><dependency><groupId>org.apache.commons</groupId><artifactId>commons-pool2</artifactId></dependency><!-- 解析客户端操作系统、浏览器等 --><dependency><groupId>eu.bitwalker</groupId><artifactId>UserAgentUtils</artifactId></dependency><!-- servlet包 --><dependency><groupId>javax.servlet</groupId><artifactId>javax.servlet-api</artifactId></dependency></dependencies></project>

system的

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns="http://maven.apache.org/POM/4.0.0"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><parent><artifactId>ruoyi</artifactId><groupId>com.ruoyi</groupId><version>3.8.5</version></parent><modelVersion>4.0.0</modelVersion><packaging>jar</packaging><artifactId>ruoyi-system</artifactId><description>system系统模块</description><dependencies><!-- 通用工具--><dependency><groupId>com.ruoyi</groupId><artifactId>ruoyi-common</artifactId></dependency></dependencies></project>

quartz

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns="http://maven.apache.org/POM/4.0.0"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><parent><artifactId>ruoyi</artifactId><groupId>com.ruoyi</groupId><version>3.8.5</version></parent><modelVersion>4.0.0</modelVersion><artifactId>ruoyi-quartz</artifactId><packaging>jar</packaging><description>quartz定时任务</description><dependencies><!-- 定时任务 --><dependency><groupId>org.quartz-scheduler</groupId><artifactId>quartz</artifactId><exclusions><exclusion><groupId>com.mchange</groupId><artifactId>c3p0</artifactId></exclusion></exclusions></dependency><!-- 通用工具--><dependency><groupId>com.ruoyi</groupId><artifactId>ruoyi-common</artifactId></dependency></dependencies></project>

generator的

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns="http://maven.apache.org/POM/4.0.0"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><parent><artifactId>ruoyi</artifactId><groupId>com.ruoyi</groupId><version>3.8.5</version></parent><modelVersion>4.0.0</modelVersion><artifactId>ruoyi-generator</artifactId><packaging>jar</packaging><description>generator代码生成</description><dependencies><!--velocity代码生成使用模板 --><dependency><groupId>org.apache.velocity</groupId><artifactId>velocity-engine-core</artifactId></dependency><!-- collections工具类 --><dependency><groupId>commons-collections</groupId><artifactId>commons-collections</artifactId></dependency><!-- 通用工具--><dependency><groupId>com.ruoyi</groupId><artifactId>ruoyi-common</artifactId></dependency></dependencies></project>

framwork的

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns="http://maven.apache.org/POM/4.0.0"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><parent><artifactId>ruoyi</artifactId><groupId>com.ruoyi</groupId><version>3.8.5</version></parent><modelVersion>4.0.0</modelVersion><artifactId>ruoyi-framework</artifactId><packaging>jar</packaging><description>framework框架核心</description><dependencies><!-- SpringBoot Web容器 --><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency><!-- SpringBoot 拦截器 --><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-aop</artifactId></dependency><!-- 阿里数据库连接池 --><dependency><groupId>com.alibaba</groupId><artifactId>druid-spring-boot-starter</artifactId></dependency><!-- 验证码 --><dependency><groupId>pro.fessional</groupId><artifactId>kaptcha</artifactId><exclusions><exclusion><artifactId>javax.servlet-api</artifactId><groupId>javax.servlet</groupId></exclusion></exclusions></dependency><!-- 获取系统信息 --><dependency><groupId>com.github.oshi</groupId><artifactId>oshi-core</artifactId></dependency><!-- 系统模块--><dependency><groupId>com.ruoyi</groupId><artifactId>ruoyi-system</artifactId></dependency></dependencies></project>

ems的

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns="http://maven.apache.org/POM/4.0.0"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><parent><groupId>com.ruoyi</groupId><artifactId>ruoyi</artifactId><version>3.8.5</version></parent><artifactId>ruoyi-ems</artifactId><packaging>jar</packaging><properties><maven.compiler.source>8</maven.compiler.source><maven.compiler.target>8</maven.compiler.target><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding></properties><dependencies><!-- spring-boot-devtools --><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-devtools</artifactId><optional>true</optional> <!-- 表示依赖不会传递 --></dependency><!-- swagger3--><dependency><groupId>io.springfox</groupId><artifactId>springfox-boot-starter</artifactId></dependency><!-- 防止进入swagger页面报类型转换错误,排除3.0.0中的引用,手动增加1.6.2版本 --><dependency><groupId>io.swagger</groupId><artifactId>swagger-models</artifactId><version>1.6.2</version></dependency><!-- Mysql驱动包 --><dependency><groupId>mysql</groupId><artifactId>mysql-connector-java</artifactId></dependency><!-- 核心模块--><dependency><groupId>com.ruoyi</groupId><artifactId>ruoyi-framework</artifactId></dependency><!-- 定时任务--><dependency><groupId>com.ruoyi</groupId><artifactId>ruoyi-quartz</artifactId></dependency><dependency><groupId>com.ruoyi</groupId><artifactId>ruoyi-common</artifactId></dependency></dependencies></project>

admin的

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns="http://maven.apache.org/POM/4.0.0"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><parent><artifactId>ruoyi</artifactId><groupId>com.ruoyi</groupId><version>3.8.5</version></parent><modelVersion>4.0.0</modelVersion><packaging>jar</packaging><artifactId>ruoyi-admin</artifactId><!--    <modules>-->
<!--        <module>../ruoyi-common</module>-->
<!--        <module>../ruoyi-ems</module>-->
<!--        <module>../ruoyi-framework</module>-->
<!--        <module>../ruoyi-generator</module>-->
<!--        <module>../ruoyi-quartz</module>-->
<!--        <module>../ruoyi-system</module>-->
<!--    </modules>--><description>web服务入口</description><dependencies><!-- spring-boot-devtools --><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-devtools</artifactId><optional>true</optional> <!-- 表示依赖不会传递 --></dependency><!-- swagger3--><dependency><groupId>io.springfox</groupId><artifactId>springfox-boot-starter</artifactId></dependency><!-- 防止进入swagger页面报类型转换错误,排除3.0.0中的引用,手动增加1.6.2版本 --><dependency><groupId>io.swagger</groupId><artifactId>swagger-models</artifactId><version>1.6.2</version></dependency><!-- Mysql驱动包 --><dependency><groupId>mysql</groupId><artifactId>mysql-connector-java</artifactId></dependency><!-- 核心模块--><dependency><groupId>com.ruoyi</groupId><artifactId>ruoyi-framework</artifactId></dependency><!-- 定时任务--><dependency><groupId>com.ruoyi</groupId><artifactId>ruoyi-quartz</artifactId></dependency><!-- 代码生成--><dependency><groupId>com.ruoyi</groupId><artifactId>ruoyi-generator</artifactId></dependency><dependency><groupId>com.ruoyi</groupId><artifactId>ruoyi-ems</artifactId></dependency></dependencies><build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><version>2.1.1.RELEASE</version><configuration><fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
<!--                    <mainClass>com.ruoyi.RuoYiApplication</mainClass>--></configuration><executions><execution><goals><goal>repackage</goal></goals></execution></executions></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-war-plugin</artifactId><version>3.1.0</version><configuration><failOnMissingWebXml>false</failOnMissingWebXml><warName>${project.artifactId}</warName></configuration></plugin></plugins><finalName>${project.artifactId}</finalName></build></project>

最后是父pom

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns="http://maven.apache.org/POM/4.0.0"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>com.ruoyi</groupId><artifactId>ruoyi</artifactId><version>3.8.5</version><name>ruoyi</name><url>http://www.ruoyi.vip</url><description>若依管理系统</description><properties><ruoyi.version>3.8.5</ruoyi.version><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding><java.version>1.8</java.version><maven-jar-plugin.version>3.1.1</maven-jar-plugin.version><druid.version>1.2.16</druid.version><bitwalker.version>1.21</bitwalker.version><swagger.version>3.0.0</swagger.version><kaptcha.version>2.3.3</kaptcha.version><pagehelper.boot.version>1.4.6</pagehelper.boot.version><fastjson.version>2.0.23</fastjson.version><oshi.version>6.4.0</oshi.version><commons.io.version>2.11.0</commons.io.version><commons.collections.version>3.2.2</commons.collections.version><poi.version>4.1.2</poi.version><velocity.version>2.3</velocity.version><jwt.version>0.9.1</jwt.version></properties><!-- 依赖声明 --><dependencyManagement><dependencies><!-- SpringBoot的依赖配置--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-dependencies</artifactId><version>2.5.14</version><type>pom</type><scope>import</scope></dependency><!-- 阿里数据库连接池 --><dependency><groupId>com.alibaba</groupId><artifactId>druid-spring-boot-starter</artifactId><version>${druid.version}</version></dependency><!-- 解析客户端操作系统、浏览器等 --><dependency><groupId>eu.bitwalker</groupId><artifactId>UserAgentUtils</artifactId><version>${bitwalker.version}</version></dependency><!-- pagehelper 分页插件 --><dependency><groupId>com.github.pagehelper</groupId><artifactId>pagehelper-spring-boot-starter</artifactId><version>${pagehelper.boot.version}</version></dependency><!-- 获取系统信息 --><dependency><groupId>com.github.oshi</groupId><artifactId>oshi-core</artifactId><version>${oshi.version}</version></dependency><!-- Swagger3依赖 --><dependency><groupId>io.springfox</groupId><artifactId>springfox-boot-starter</artifactId><version>${swagger.version}</version><exclusions><exclusion><groupId>io.swagger</groupId><artifactId>swagger-models</artifactId></exclusion></exclusions></dependency><!-- io常用工具类 --><dependency><groupId>commons-io</groupId><artifactId>commons-io</artifactId><version>${commons.io.version}</version></dependency><!-- excel工具 --><dependency><groupId>org.apache.poi</groupId><artifactId>poi-ooxml</artifactId><version>${poi.version}</version></dependency><!-- velocity代码生成使用模板 --><dependency><groupId>org.apache.velocity</groupId><artifactId>velocity-engine-core</artifactId><version>${velocity.version}</version></dependency><!-- collections工具类 --><dependency><groupId>commons-collections</groupId><artifactId>commons-collections</artifactId><version>${commons.collections.version}</version></dependency><!-- 阿里JSON解析器 --><dependency><groupId>com.alibaba.fastjson2</groupId><artifactId>fastjson2</artifactId><version>${fastjson.version}</version></dependency><!-- Token生成与解析--><dependency><groupId>io.jsonwebtoken</groupId><artifactId>jjwt</artifactId><version>${jwt.version}</version></dependency><!-- 验证码 --><dependency><groupId>pro.fessional</groupId><artifactId>kaptcha</artifactId><version>${kaptcha.version}</version></dependency><!-- 定时任务--><dependency><groupId>com.ruoyi</groupId><artifactId>ruoyi-quartz</artifactId><version>${ruoyi.version}</version></dependency><!-- 代码生成--><dependency><groupId>com.ruoyi</groupId><artifactId>ruoyi-generator</artifactId><version>${ruoyi.version}</version></dependency><!-- 核心模块--><dependency><groupId>com.ruoyi</groupId><artifactId>ruoyi-framework</artifactId><version>${ruoyi.version}</version></dependency><!-- 系统模块--><dependency><groupId>com.ruoyi</groupId><artifactId>ruoyi-system</artifactId><version>${ruoyi.version}</version></dependency><!-- 通用工具--><dependency><groupId>com.ruoyi</groupId><artifactId>ruoyi-common</artifactId><version>${ruoyi.version}</version></dependency><dependency><groupId>com.ruoyi</groupId><artifactId>ruoyi-ems</artifactId><version>3.8.5</version></dependency></dependencies></dependencyManagement><modules><module>ruoyi-admin</module><module>ruoyi-framework</module><module>ruoyi-system</module><module>ruoyi-quartz</module><module>ruoyi-generator</module><module>ruoyi-common</module><module>ruoyi-ems</module></modules><packaging>pom</packaging><dependencies></dependencies><build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>3.1</version><configuration><source>${java.version}</source><target>${java.version}</target><encoding>${project.build.sourceEncoding}</encoding></configuration></plugin></plugins></build><repositories><repository><id>public</id><name>aliyun nexus</name><url>https://maven.aliyun.com/repository/public</url><releases><enabled>true</enabled></releases></repository></repositories><pluginRepositories><pluginRepository><id>public</id><name>aliyun nexus</name><url>https://maven.aliyun.com/repository/public</url><releases><enabled>true</enabled></releases><snapshots><enabled>false</enabled></snapshots></pluginRepository></pluginRepositories></project>

所以打包顺序也是common-system-quartz-generator-framework-ems-admin-父pom

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.luyixian.cn/news_show_345624.aspx

如若内容造成侵权/违法违规/事实不符,请联系dt猫网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【C++从0到王者】第二十一站:继承

文章目录 前言一、继承的概念及定义1. 继承的概念2.继承的格式3.继承关系与访问限定符 二、基类和派生类的赋值转换三、继承中的作用域四、派生类的默认成员函数五、继承与友元六、继承与静态成员 前言 继承是面向对象的三大特性之一。我们常常会遇到这样的情况。很多角色的信…

MYSQL 作业三

创建一个student表格&#xff1a; create table student( id int(10) not null unique primary key, name varchar(20) not null, sex varchar(4), birth year, department varchar(20), address varchar(50) ); 创建一个score表格 create table score( id int(10) n…

ASP.NET WEB API通过SugarSql连接MySQL数据库

注意&#xff1a;VS2022企业版可以&#xff0c;社区版可能存在问题。实体名称和字段和数据库中的要一致。 1、创建项目&#xff0c;安装SqlSugarCore、Pomelo.EntityFrameworkCore.MySql插件 2、文件结构 2、appsettings.json { “Logging”: { “LogLevel”: { “Default”: …

从零实现kv存储V2.0

在V1.0版本&#xff0c;我们实现了基于array的kv存储引擎。本文继续完善&#xff0c;增加rbtree、hash、skiptable引擎。 实际上&#xff0c;在框架确定的基础上&#xff0c;其他的引擎只需要添加接口即可。 一、架构设计 二、具体实现 2.1 引擎层 //---------------------…

每天一道leetcode:646. 最长数对链(动态规划中等)

今日份题目&#xff1a; 给你一个由 n 个数对组成的数对数组 pairs &#xff0c;其中 pairs[i] [lefti, righti] 且 lefti < righti 。 现在&#xff0c;我们定义一种 跟随 关系&#xff0c;当且仅当 b < c 时&#xff0c;数对 p2 [c, d] 才可以跟在 p1 [a, b] 后面…

WSL2 Ubuntu子系统安装OpenCV

文章目录 前言一、&#xfeff;基本概念二、操作步骤1.下载源码2.安装依赖3.运行编译4.配置路径 前言 OpenCV用C语言编写&#xff0c;它的主要接口也是C语言&#xff0c;但是依然保留了大量的C语言接口。该库也有大量的Python, Java and MATLAB/OCTAVE (版本2.5)的接口。这些语…

最长递增子序列——力扣300

int lengthOfLIS(vector<int>& nums) {int len=1, n=nums.size();if

临床试验三原则-对照、重复、随机

临床试验必须遵循三个基本原则&#xff1a;对照、重复、随机。 一、对照原则和对照的设置 核心观点&#xff1a;有比较才有鉴别。 对照组和试验组同质可比。 三臂试验 安慰剂&#xff1a;试验组&#xff1a;阳性对照组1&#xff1a;n&#xff1a;m&#xff08;n≥m&#xff…

Android Framework 动态更新插拔设备节点执行权限

TF卡设备节点是插上之后动态添加&#xff0c;所以不能通过初始化设备节点权限来解决&#xff0c;需要监听TF插入事件&#xff0c;在init.rc 监听插入后动态更新设备节点执行权限 添加插拔TF卡监听 frameworks/base/services/core/java/com/android/server/StorageManagerServic…

轻量级自动化测试框架WebZ

一、什么是WebZ WebZ是我用Python写的“关键字驱动”的自动化测试框架&#xff0c;基于WebDriver。 设计该框架的初衷是&#xff1a;用自动化测试让测试人员从一些简单却重复的测试中解放出来。之所以用“关键字驱动”模式是因为我觉得这样能让测试人员&#xff08;测试执行人员…

《Java-SE-第三十八章》之注解

前言 在你立足处深挖下去,就会有泉水涌出!别管蒙昧者们叫嚷:“下边永远是地狱!” 博客主页&#xff1a;KC老衲爱尼姑的博客主页 博主的github&#xff0c;平常所写代码皆在于此 共勉&#xff1a;talk is cheap, show me the code 作者是爪哇岛的新手&#xff0c;水平很有限&…

Hlang社区项目说明

文章目录 前言Hlang社区技术前端后端 前言 Hello,欢迎来到本专栏&#xff0c;那么这也是第一次做这种类型的专栏&#xff0c;如有不做多多指教。那么在这里我要隆重介绍的就是这个Hlang这个项目。 首先&#xff0c;这里我要说明的是&#xff0c;我们的这个项目其实是分为两个…

Docker容器:docker基础概述、安装、网络及资源控制

文章目录 一.docker容器概述1.什么是容器2. docker与虚拟机的区别2.1 docker虚拟化产品有哪些及其对比2.2 Docker与虚拟机的区别 3.Docker容器的使用场景4.Docker容器的优点5.Docker 的底层运行原理6.namespace的六项隔离7.Docker核心概念 二.Docker安装 及管理1.安装 Docker1.…

Python语法基础——循环

学习目标 通过使用while循环编写重复执行的语句。遵从循环的设计策略开发循环。利用用户的确认控制循环。用哨兵值控制循环。通过使用输入重定向从文件获取大量数据而不是从键盘输入来来获取大量数据&#xff0c;并且使用输出重定向将输出存人文件。使用for循环来实现计数器控制…

vue 发现页面找不到3秒后跳转到本页面

这个路由跳转用到的是编程式跳转this.$router.push 两种写法&#xff1a; 第一种可以通过path来跳转 goto(/find) find是路由里边的路径 <span click"goto(/find)">发现音乐</span> <span click"goto(/my)">我的音乐</span> <…

单片机如何分散加载文件

本篇文章将通过实际操作介绍如何实现分散加载文件的方法。开发工具为&#xff1a;mdk&#xff1b;开发板&#xff1a;野火stm32f407 一、建立工程 通过实现简单的加法计算的软件算法&#xff0c;来了解分散加载image 的方法。 建立工程&#xff0c;创建文件夹以及相应的文件&am…

【boost网络库从青铜到王者】第三篇:asio网络编程中的buffer缓存数据结构

文章目录 1、关于buffer数据结构1.1、简单概括一下&#xff0c;我们可以用buffer() 函数生成我们要用的缓存存储数据。1.2、但是这太复杂了&#xff0c;可以直接用buffer函数转化为send需要的参数类型:1.3、output_buf可以直接传递给该send接口。我们也可以将数组转化为send接受…

PyQt5资源的加载和使用,即如何使用Pyrcc

1、打开QtDesigner&#xff0c;选择编辑资源 2、新建资源文件&#xff0c;随便找个地方保存 3、按照自己的喜好命名&#xff0c;然后添加资源 4、保存并退出 5、我们创建一个QLabel&#xff0c;在这里添加资源 6、我们保存界面文件&#xff0c;并编译为py文件&#xff0c;然后…

SpringBoot + Mybatis多数据源

一、配置文件 spring: # datasource: # username: root # password: 123456 # url: jdbc:mysql://127.0.0.1:3306/jun01?characterEncodingutf-8&serverTimezoneUTC # driver-class-name: com.mysql.cj.jdbc.Driverdatasource:# 数据源1onedata:jdbc-url: j…

【5款登录验证校验】基于jquery实现的5款登录验证码组件(附完整源码)

文章目录 写在前面涉及知识点1、随机字母验证码1.1 效果1.2 实现源码 2、数字运算验证码2.1 效果2.2 实现源码 3、滑块验证码3.1 效果3.2 实现源码 4、图片补全验证码4.1 效果4.2 实现源码 5、顺序点选验证码5.1 效果5.2 实现源码 6、源码分享6.1 百度网盘6.2 123网盘6.3 邮箱留…