SpringBoot2.x简单集成Flowable
环境和版本
window10
java1.8
mysql8
flowable6
springboot 2.7.6
配置
使用IDEA创建一个SpringBoot项目
<?xml version="1.0" encoding="UTF-8"?>
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>com.example</groupId><artifactId>flowable-demo</artifactId><version>0.0.1-SNAPSHOT</version><name>flowable-demo</name><description>flowable-demo</description><properties><java.version>1.8</java.version><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding><spring-boot.version>2.7.6</spring-boot.version></properties><dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency><dependency><groupId>org.flowable</groupId><artifactId>flowable-spring-boot-starter</artifactId><version>6.4.1</version><exclusions><!-- 这里要排除mybatis,否则会覆盖mybatis-plus引入的mybatis版本 --><exclusion><groupId>org.mybatis</groupId><artifactId>mybatis</artifactId></exclusion></exclusions></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-jdbc</artifactId></dependency><!-- mybatis-plus --><dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-boot-starter</artifactId><version>3.5.2</version></dependency><!-- mybatis-plus generator --><dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-generator</artifactId><version>3.5.3</version></dependency><dependency><groupId>org.freemarker</groupId><artifactId>freemarker</artifactId><version>2.3.31</version></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-devtools</artifactId><scope>runtime</scope><optional>true</optional></dependency><dependency><groupId>mysql</groupId><artifactId>mysql-connector-java</artifactId><scope>runtime</scope></dependency><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><optional>true</optional></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope></dependency></dependencies><dependencyManagement><dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-dependencies</artifactId><version>${spring-boot.version}</version><type>pom</type><scope>import</scope></dependency></dependencies></dependencyManagement><build><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>3.8.1</version><configuration><source>1.8</source><target>1.8</target><encoding>UTF-8</encoding></configuration></plugin><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><version>${spring-boot.version}</version><configuration><mainClass>com.example.flowable.demo.FlowableDemoApplication</mainClass><skip>true</skip></configuration><executions><execution><id>repackage</id><goals><goal>repackage</goal></goals></execution></executions></plugin></plugins></build>
</project>
application.yml中配置
mybatis-plus:global-config:db-config:logic-delete-field: deletedlogic-delete-value: 1logic-not-delete-value: 0configuration:log-impl: org.apache.ibatis.logging.stdout.StdOutImplspring:datasource:url: jdbc:mysql://localhost:3306/flowable_demo?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&allowMultiQueries=true&nullCatalogMeansCurrent=truedriver-class-name: com.mysql.cj.jdbc.Driverusername: rootpassword: qk123type: com.zaxxer.hikari.HikariDataSourcehikari:minimum-idle: 5maximum-pool-size: 15auto-commit: trueidle-timeout: 30000pool-name: DatebookHikariCPmax-lifetime: 1800000connection-timeout: 30000connection-test-query: SELECT 1# jackson 配置jackson:date-format: yyyy-MM-dd HH:mm:sslocale: zhtime-zone: GMT+8#server.servlet.context-path=/
# swagger2使用,不配置这个项目报错 Failed to start bean ‘documentationPluginsBootstrapper‘
flowable:# 第一次改为true,创建完数据库表结构后,改为falsedatabase-schema-update: trueasync-executor-activate: false
server:port: 11000
# 设置flowable日志级别
logging:level:org.flowable: debug
#spring.mvc.pathmatch.matching-strategy=ant-path-matcher
再创建一个数据库
然后运行
数据库中会自动生成表结构
表结构位置
常用的类
flowable的autoconfig包已经自动配置好了需要的类
直接@Resource就可以使用
使用
部署一个简单流程
import com.example.flowable.demo.controller.vo.DefinitionRequest;
import com.example.flowable.demo.vo.R;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.RandomUtils;
import org.flowable.engine.RepositoryService;
import org.flowable.engine.impl.bpmn.deployer.ResourceNameUtil;
import org.flowable.engine.repository.DeploymentBuilder;
import org.flowable.engine.repository.Model;
import org.flowable.engine.repository.ModelQuery;
import org.springframework.web.bind.annotation.*;import javax.annotation.Resource;
import java.nio.charset.StandardCharsets;
import java.util.List;@Slf4j
@RestController
@RequestMapping("/modeler")
public class ModelerController {@Resourceprivate RepositoryService repositoryService;/*** 部署流程* @param definitionRequest* @return*/@PutMapping("/deploy")public R deployModeler(@RequestBody DefinitionRequest definitionRequest) {String xmlDefinition = definitionRequest.getXmlDefinition();DeploymentBuilder deployment = repositoryService.createDeployment();byte[] bytes = xmlDefinition.getBytes(StandardCharsets.UTF_8);int i = RandomUtils.nextInt();String key = "demo_flow_" + i;String name = "示例流程";String category = "hello_" + i;// 流程定义的名称,必须是特定的结尾,否则不会解析String resourceName = "demo_flow_name_" + i + "." + ResourceNameUtil.BPMN_RESOURCE_SUFFIXES[0];String id = deployment.addBytes(resourceName, bytes).key(key).category(category).name(name).deploy().getId();log.info("部署后id为:{}", id);Model model = repositoryService.newModel();model.setDeploymentId(id);model.setCategory("model_" + category);model.setKey("model_key_" + i);model.setName("model_name_" + i);model.setVersion(1);repositoryService.saveModel(model);log.info("模型保存后id:{}", model.getId());// 设置模型可编辑资源repositoryService.addModelEditorSource(model.getId(), bytes);return R.success(id);}/*** 查看流程模型列表* @return*/@GetMapping("/list")public R list() {ModelQuery modelQuery = repositoryService.createModelQuery();List<Model> list = modelQuery.list();return R.success();}}
用postman发送一个请求
{"xmlDefinition": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<definitions xmlns=\"http://www.omg.org/spec/BPMN/20100524/MODEL\"\n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"\n xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\"\n xmlns:omgdc=\"http://www.omg.org/spec/DD/20100524/DC\"\n xmlns:omgdi=\"http://www.omg.org/spec/DD/20100524/DI\"\n xmlns:flowable=\"http://flowable.org/bpmn\"\n typeLanguage=\"http://www.w3.org/2001/XMLSchema\"\n expressionLanguage=\"http://www.w3.org/1999/XPath\"\n targetNamespace=\"http://www.flowable.org/processdef\">\n\n <process id=\"holidayRequest\" name=\"Holiday Request\" isExecutable=\"true\">\n\n <startEvent id=\"startEvent\"/>\n <sequenceFlow sourceRef=\"startEvent\" targetRef=\"approveTask\"/>\n\n <userTask id=\"approveTask\" name=\"Approve or reject request\"/>\n <sequenceFlow sourceRef=\"approveTask\" targetRef=\"decision\"/>\n\n <exclusiveGateway id=\"decision\"/>\n <sequenceFlow sourceRef=\"decision\" targetRef=\"externalSystemCall\">\n <conditionExpression xsi:type=\"tFormalExpression\">\n <![CDATA[\n ${approved} ]]>\n </conditionExpression>\n </sequenceFlow>\n <sequenceFlow sourceRef=\"decision\" targetRef=\"sendRejectionMail\">\n <conditionExpression xsi:type=\"tFormalExpression\">\n <![CDATA[\n ${approved} ]]>\n </conditionExpression>\n </sequenceFlow>\n\n <serviceTask id=\"externalSystemCall\" name=\"Enter holidays in external system\"\n flowable:class=\"org.flowable.CallExternalSystemDelegate\"/>\n <sequenceFlow sourceRef=\"externalSystemCall\" targetRef=\"holidayApprovedTask\"/>\n\n <userTask id=\"holidayApprovedTask\" name=\"Holiday approved\"/>\n <sequenceFlow sourceRef=\"holidayApprovedTask\" targetRef=\"approveEnd\"/>\n\n <serviceTask id=\"sendRejectionMail\" name=\"Send out rejection email\"\n flowable:class=\"org.flowable.SendRejectionMail\"/>\n <sequenceFlow sourceRef=\"sendRejectionMail\" targetRef=\"rejectEnd\"/>\n\n <endEvent id=\"approveEnd\"/>\n\n <endEvent id=\"rejectEnd\"/>\n </process>\n\n</definitions>"
}
在数据库中会出现对应的数据
接着发起流程
import com.example.flowable.demo.controller.vo.DefinitionRequest;
import com.example.flowable.demo.controller.vo.ProcessDefinitionResp;
import com.example.flowable.demo.vo.R;
import lombok.extern.slf4j.Slf4j;
import org.flowable.engine.RepositoryService;
import org.flowable.engine.RuntimeService;
import org.flowable.engine.repository.ProcessDefinition;
import org.flowable.engine.repository.ProcessDefinitionQuery;
import org.flowable.engine.runtime.ProcessInstance;
import org.springframework.web.bind.annotation.*;import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;@Slf4j
@RestController
@RequestMapping("/process")
public class ProcessController {@Resourceprivate RuntimeService runtimeService;@Resourceprivate RepositoryService repositoryService;/*** 查看流程定义列表* @return*/@GetMapping("/list")public R list() {ProcessDefinitionQuery processDefinitionQuery = repositoryService.createProcessDefinitionQuery();List<ProcessDefinition> list = processDefinitionQuery.list();log.info("得到流程定义数量:{}", list.size());// ProcessDefinition无法序列化,需要自己转List<ProcessDefinitionResp> respList = new ArrayList<>();for (ProcessDefinition processDefinition : list) {respList.add(ProcessDefinitionResp.copy(processDefinition));}return R.success(respList);}/*** 启动流程* @param definitionRequest* @return*/@PutMapping("/create")public R create(@RequestBody DefinitionRequest definitionRequest) {String deploymentId = definitionRequest.getDeploymentId();ProcessDefinitionQuery processDefinitionQuery = repositoryService.createProcessDefinitionQuery();ProcessDefinition processDefinition = processDefinitionQuery.deploymentId(deploymentId).singleResult();Map<String, Object> variables = new HashMap<>();variables.put("employee","张三") ;// 谁申请请假variables.put("nrOfHolidays",3); // 请几天假variables.put("description","工作累了,想出去玩玩"); // 请假的原因ProcessInstance holidayRequest = runtimeService.startProcessInstanceByKey("holidayRequest", variables);String id = holidayRequest.getId();log.info("启动的流程实例id:{}, 流程定义id:{}", id, processDefinition.getId());return R.success(id);}
}
查看任务
import com.example.flowable.demo.controller.vo.TaskResp;
import com.example.flowable.demo.vo.R;
import lombok.extern.slf4j.Slf4j;
import org.flowable.engine.TaskService;
import org.flowable.task.api.Task;
import org.flowable.task.api.TaskQuery;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;@Slf4j
@RestController
@RequestMapping("/task")
public class TaskController {@Resourceprivate TaskService taskService;/*** 查看所有待办任务* @return*/@GetMapping("/list")public R list() {TaskQuery taskQuery = taskService.createTaskQuery();List<Task> list = taskQuery.list();List<TaskResp> list1 = new ArrayList<>();for (Task task : list) {list1.add(TaskResp.copy(task));}return R.success(list1);}
}
其他类
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;import java.io.Serializable;@Getter
@Setter
@Accessors(chain = true)
public class R implements Serializable {private int code;private String message;private Object data;public static R gen(int code, String message, Object data) {return new R().setCode(code).setMessage(message).setData(data);}public static R success() {return R.success(null);}public static R success(Object data) {return R.success("请求成功", data);}public static R success(String message, Object data) {return R.gen(0, message, data);}public static R fail() {return R.fail(null);}public static R fail(Object data) {return R.fail("请求失败", data);}public static R fail(String message, Object data) {return R.gen(-1, message, data);}
}
import lombok.Getter;
import lombok.Setter;/*** 流程定义请求*/
@Getter
@Setter
public class DefinitionRequest {// 流程xml定义,部署流程用private String xmlDefinition;// 部署id,创建流程用private String deploymentId;
}
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.flowable.engine.repository.ProcessDefinition;import java.io.Serializable;/*** 流程定义*/
@Getter
@Setter
@Accessors(chain = true)
public class ProcessDefinitionResp implements Serializable {String id;String category;String name;String key;String description;int version;String resourceName;String deploymentId;String diagramResourceName;boolean hasStartFormKey;boolean hasGraphicalNotation;boolean suspended;String tenantId;String derivedFrom;String derivedFromRoot;int derivedVersion;String engineVersion;public static ProcessDefinitionResp copy(ProcessDefinition processDefinition) {ProcessDefinitionResp definitionResp = new ProcessDefinitionResp();definitionResp.setId(processDefinition.getId());definitionResp.setCategory(processDefinition.getCategory());definitionResp.setName(processDefinition.getName());definitionResp.setKey(processDefinition.getKey());definitionResp.setDescription(processDefinition.getDescription());definitionResp.setVersion(processDefinition.getVersion());definitionResp.setResourceName(processDefinition.getResourceName());definitionResp.setDeploymentId(processDefinition.getDeploymentId());definitionResp.setDiagramResourceName(processDefinition.getDiagramResourceName());definitionResp.setHasStartFormKey(processDefinition.hasStartFormKey());definitionResp.setHasGraphicalNotation(processDefinition.hasGraphicalNotation());definitionResp.setSuspended(processDefinition.isSuspended());definitionResp.setTenantId(processDefinition.getTenantId());definitionResp.setDerivedFrom(processDefinition.getDerivedFrom());definitionResp.setDerivedFromRoot(processDefinition.getDerivedFromRoot());definitionResp.setDerivedVersion(processDefinition.getDerivedVersion());definitionResp.setEngineVersion(processDefinition.getEngineVersion());return definitionResp;}
}
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.flowable.task.api.Task;import java.io.Serializable;
import java.util.*;/*** 任务*/
@Getter
@Setter
@Accessors(chain = true)
public class TaskResp implements Serializable {String id;String name;String description;int priority;String owner;String assignee;String processInstanceId;String executionId;String taskDefinitionId;String processDefinitionId;String scopeId;String subScopeId;String scopeType;String scopeDefinitionId;Date createTime;String taskDefinitionKey;Date dueDate;String category;String parentTaskId;String tenantId;String formKey;Map<String, Object> taskLocalVariables;Map<String, Object> processVariables;List<IdentityLinkInfoResp> identityLinks;Date claimTime;public static TaskResp copy(Task task) {TaskResp taskResp = new TaskResp();taskResp.setId(task.getId());taskResp.setName(task.getName());taskResp.setDescription(task.getDescription());taskResp.setPriority(task.getPriority());taskResp.setOwner(task.getOwner());taskResp.setAssignee(task.getAssignee());taskResp.setProcessInstanceId(task.getProcessInstanceId());taskResp.setExecutionId(task.getExecutionId());taskResp.setTaskDefinitionId(task.getTaskDefinitionId());taskResp.setProcessDefinitionId(task.getProcessDefinitionId());taskResp.setScopeId(task.getScopeId());taskResp.setSubScopeId(task.getSubScopeId());taskResp.setScopeType(task.getScopeType());taskResp.setScopeDefinitionId(task.getScopeDefinitionId());taskResp.setCreateTime(task.getCreateTime());taskResp.setTaskDefinitionKey(task.getTaskDefinitionKey());taskResp.setDueDate(task.getDueDate());taskResp.setCategory(task.getCategory());taskResp.setParentTaskId(task.getParentTaskId());taskResp.setTenantId(task.getTenantId());taskResp.setFormKey(task.getFormKey());taskResp.setTaskLocalVariables(task.getTaskLocalVariables());taskResp.setProcessVariables(task.getProcessVariables());
// List<? extends IdentityLinkInfo> identityLinks1 = task.getIdentityLinks();taskResp.setIdentityLinks(new ArrayList<>());
// if (Objects.nonNull(identityLinks1) && !identityLinks1.isEmpty()) {
// for (IdentityLinkInfo identityLinkInfo : identityLinks1) {
// taskResp.getIdentityLinks().add(IdentityLinkInfoResp.copy(identityLinkInfo));
// }
// }taskResp.setClaimTime(task.getClaimTime());return taskResp;}
}
Flowable基本的模块
Modeler 模型
Process 流程
Task 任务
模型部署后,就是流程定义。
从流程定义创建流程实例。
流程实例中有多个任务,任务有很多种类。
相关文章:

SpringBoot2.x简单集成Flowable
环境和版本 window10 java1.8 mysql8 flowable6 springboot 2.7.6 配置 使用IDEA创建一个SpringBoot项目 <?xml version"1.0" encoding"UTF-8"?> <project xmlns"http://maven.apache.org/POM/4.0.0" xmlns:xsi"http://www.…...

微信小程序一键获取位置
需求 有个表单需要一键获取对应位置 并显示出来效果如下: 点击一键获取获取对应位置 显示在 picker 默认选中 前端 代码如下: <view class"box_7 {{ showChange1? change-style: }}"><view class"box_11"><view class"…...

Linux性能优化--使用性能工具发现问题
9.0 概述 本章主要介绍综合运用之前提出的性能工具来缩小性能问题产生原因的范围。阅读本章后,你将能够: 启动行为异常的系统,使用Linux性能工具追踪行为异常的内核函数或应用程序。启动行为异常的应用程序,使用Linux性能工具追…...

【Proteus仿真】【STM32单片机】路灯控制系统
文章目录 一、功能简介二、软件设计三、实验现象联系作者 一、功能简介 本项目使用Proteus8仿真STM32单片机控制器,使用LCD1602显示模块、人体红外传感器、光线检测模块、路灯继电器控制等。 主要功能: 系统运行后,LCD1602显示时间、工作模…...

Flutter笔记:发布一个Flutter头像模块 easy_avatar
Flutter笔记 发布一个头像Flutter模块 easy_avatar 作者:李俊才 (jcLee95):https://blog.csdn.net/qq_28550263 邮箱 :291148484163.com 本文地址:https://blog.csdn.net/qq_28550263/article/details/1339…...

标准化助推开源发展丨九州未来参编开源领域4项团体标准正式发布
在数字中国及数字经济时代的大背景下,开源逐步成为各行业数字化发展的关键模式。在开源产业迅速发展的同时,如何评估、规范开源治理成为行业极度关注的问题。 近日,中电标2023年第27号团体标准公告正式发布,九州未来作为起草单位…...

ChatGPT对于留学生论文写作有哪些帮助?
2022年11月,OpenAI公司的智能聊天产品ChatGPT横空出世,并两个月之内吸引了超过1亿用户,打破了TikTok(抖音国际版)9个月用户破亿的纪录。 划时代的浪潮 ChatGPT的火爆立即引起了全球关注并成为热门话题,它…...

【yolov8目标检测】使用yolov8训练自己的数据集
目录 准备数据集 python安装yolov8 配置yaml 从0开始训练 从预训练模型开始训练 准备数据集 首先得准备好数据集,你的数据集至少包含images和labels,严格来说你的images应该包含训练集train、验证集val和测试集test,不过为了简单说…...

【vue+nestjs】gitee第三方授权登录【超详细】
项目场景: 前端使用vue3ts 后端使用nestjs 1.配置gitee第三方设置 1.找到账号设置 2.找到数据管理下的第三方应用 3.点击创建,进入配置 2.代码演示 特别注意: 如果你跟我一样是前后端分离的模式开发的,应用回调地址填写的应该是你的前…...
node 第八天 使用前后端不分离的方式实现cookie登录验证
实现cookie登录, 第一次登录成功后, cookie由服务端设置并保存在客户端, 后续访问在cookie过期前 (过期时间由后端设置) 将不需要登录cookie出现的背景是 HTTP是无连接的,无状态的, 半双工(http2.0以下), 所以需要一个媒介存在http中, 服务端可以操作, 客户端也可以…...

Ubuntu系统如何进行网络连接-连接电脑局域网-物联网开发-Ubuntu系统维护
一、前言 在Ubuntu系统的维护中,我们常常需要对VMware中的Ubuntu虚拟机配置网络连接,以连接服务器下载或安装软件包以及进行网络通信等。 基于上述问题,本文将着重分享Ubuntu配置网络链接的若干方法。 二、网络连接模式 打开VM,右…...

STL库——Vector常见使用接口
一、介绍 1. vector是表示可变大小数组的序列容器,就像数组一样,vector也采用的连续存储空间来存储元素。也就是意味着可以采用下标对vector的元素 进行访问,和数组一样高效。但是又不像数组,它的大小是可以动态改变的࿰…...
将文件(File 对象)分割成多个块
如果要将文件(File 对象)分割成多个块,可以使用 JavaScript 中的 Blob 和 File 构造函数以及数组的 slice 方法。以下是一个示例: // 创建一个 File 对象,例如从文件输入框获取的文件 const file document.getElemen…...

若要对多态类进行深拷贝,应使用虚函数的clone,而不是公开的拷贝构造赋值
拷贝一个多态类可能会导致切片问题,为了解决这个问题,应覆盖一个虚clone函数,让他根据实际类型进行复制并返回一个到新对象的所有权的指针(std::unique_ptr),在派生类,通过使用所谓的协变返回类型来返回派生…...
同构字符串(C++解法)
题目 给定两个字符串 s 和 t ,判断它们是否是同构的。 如果 s 中的字符可以按某种映射关系替换得到 t ,那么这两个字符串是同构的。 每个出现的字符都应当映射到另一个字符,同时不改变字符的顺序。不同字符不能映射到同一个字符上…...

『Linux升级路』基本指令
🔥博客主页:小王又困了 📚系列专栏:Linux 🌟人之为学,不日近则日退 ❤️感谢大家点赞👍收藏⭐评论✍️ 目录 一、认识操作系统 📒1.1什么是操作系统 📒1.2操作系统…...

python argparse解析参数
用法比较简单,直接看代码 import argparseargparser argparse.ArgumentParser(descriptionthis is a hello argparser program) argparser.add_argument(--arg1, -a, typestr, helparg1 has value) argparser.add_argument(--arg2, typestr, default"value2&q…...

【数据挖掘】数据挖掘、关联分析、分类预测、决策树、聚类、类神经网络与罗吉斯回归
目录 一、简介二、关于数据挖掘的经典故事和案例2.1 正在影响中国管理的10大技术2.2 从数字中能够得到什么?2.3 一个网络流传的笑话(转述)2.4 啤酒与尿布2.5 网上书店关联销售的案例2.6 数据挖掘在企业中的应用2.7 交叉销售 三、数据挖掘入门3.1 什么激发了数据挖掘…...

nodejs+vue 学生宿舍管理系统设计与实现
可将教师信息、宿管信息、学生信息、楼栋信息等输入到系统中。只有管理员才能录入相关的资料,按照提示,输入相应的资料,而“导入”则可以通过上传档案,导入成功后,相应的寝室就会相应的减少。在录入大楼的时候…...
汽车R155法规包含那些国家?
标签:R155法规国; R155强制标准;R155;UCNECE; R155是由联合国欧洲经济委员会(UNECE)的世界汽车行业论坛(WP.29)发布的法规,专门针对汽车的网络安全。因为它是…...
KubeSphere 容器平台高可用:环境搭建与可视化操作指南
Linux_k8s篇 欢迎来到Linux的世界,看笔记好好学多敲多打,每个人都是大神! 题目:KubeSphere 容器平台高可用:环境搭建与可视化操作指南 版本号: 1.0,0 作者: 老王要学习 日期: 2025.06.05 适用环境: Ubuntu22 文档说…...

地震勘探——干扰波识别、井中地震时距曲线特点
目录 干扰波识别反射波地震勘探的干扰波 井中地震时距曲线特点 干扰波识别 有效波:可以用来解决所提出的地质任务的波;干扰波:所有妨碍辨认、追踪有效波的其他波。 地震勘探中,有效波和干扰波是相对的。例如,在反射波…...
解锁数据库简洁之道:FastAPI与SQLModel实战指南
在构建现代Web应用程序时,与数据库的交互无疑是核心环节。虽然传统的数据库操作方式(如直接编写SQL语句与psycopg2交互)赋予了我们精细的控制权,但在面对日益复杂的业务逻辑和快速迭代的需求时,这种方式的开发效率和可…...

【大模型RAG】Docker 一键部署 Milvus 完整攻略
本文概要 Milvus 2.5 Stand-alone 版可通过 Docker 在几分钟内完成安装;只需暴露 19530(gRPC)与 9091(HTTP/WebUI)两个端口,即可让本地电脑通过 PyMilvus 或浏览器访问远程 Linux 服务器上的 Milvus。下面…...

剑指offer20_链表中环的入口节点
链表中环的入口节点 给定一个链表,若其中包含环,则输出环的入口节点。 若其中不包含环,则输出null。 数据范围 节点 val 值取值范围 [ 1 , 1000 ] [1,1000] [1,1000]。 节点 val 值各不相同。 链表长度 [ 0 , 500 ] [0,500] [0,500]。 …...
unix/linux,sudo,其发展历程详细时间线、由来、历史背景
sudo 的诞生和演化,本身就是一部 Unix/Linux 系统管理哲学变迁的微缩史。来,让我们拨开时间的迷雾,一同探寻 sudo 那波澜壮阔(也颇为实用主义)的发展历程。 历史背景:su的时代与困境 ( 20 世纪 70 年代 - 80 年代初) 在 sudo 出现之前,Unix 系统管理员和需要特权操作的…...
Rust 异步编程
Rust 异步编程 引言 Rust 是一种系统编程语言,以其高性能、安全性以及零成本抽象而著称。在多核处理器成为主流的今天,异步编程成为了一种提高应用性能、优化资源利用的有效手段。本文将深入探讨 Rust 异步编程的核心概念、常用库以及最佳实践。 异步编程基础 什么是异步…...

【Java_EE】Spring MVC
目录 Spring Web MVC 编辑注解 RestController RequestMapping RequestParam RequestParam RequestBody PathVariable RequestPart 参数传递 注意事项 编辑参数重命名 RequestParam 编辑编辑传递集合 RequestParam 传递JSON数据 编辑RequestBody …...
力扣-35.搜索插入位置
题目描述 给定一个排序数组和一个目标值,在数组中找到目标值,并返回其索引。如果目标值不存在于数组中,返回它将会被按顺序插入的位置。 请必须使用时间复杂度为 O(log n) 的算法。 class Solution {public int searchInsert(int[] nums, …...

AI+无人机如何守护濒危物种?YOLOv8实现95%精准识别
【导读】 野生动物监测在理解和保护生态系统中发挥着至关重要的作用。然而,传统的野生动物观察方法往往耗时耗力、成本高昂且范围有限。无人机的出现为野生动物监测提供了有前景的替代方案,能够实现大范围覆盖并远程采集数据。尽管具备这些优势…...