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

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.…...

微信小程序一键获取位置

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

Linux性能优化--使用性能工具发现问题

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

【Proteus仿真】【STM32单片机】路灯控制系统

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

Flutter笔记:发布一个Flutter头像模块 easy_avatar

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

标准化助推开源发展丨九州未来参编开源领域4项团体标准正式发布

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

ChatGPT对于留学生论文写作有哪些帮助?

2022年11月&#xff0c;OpenAI公司的智能聊天产品ChatGPT横空出世&#xff0c;并两个月之内吸引了超过1亿用户&#xff0c;打破了TikTok&#xff08;抖音国际版&#xff09;9个月用户破亿的纪录。 划时代的浪潮 ChatGPT的火爆立即引起了全球关注并成为热门话题&#xff0c;它…...

【yolov8目标检测】使用yolov8训练自己的数据集

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

【vue+nestjs】gitee第三方授权登录【超详细】

项目场景&#xff1a; 前端使用vue3ts 后端使用nestjs 1.配置gitee第三方设置 1.找到账号设置 2.找到数据管理下的第三方应用 3.点击创建&#xff0c;进入配置 2.代码演示 特别注意: 如果你跟我一样是前后端分离的模式开发的&#xff0c;应用回调地址填写的应该是你的前…...

node 第八天 使用前后端不分离的方式实现cookie登录验证

实现cookie登录, 第一次登录成功后, cookie由服务端设置并保存在客户端, 后续访问在cookie过期前 (过期时间由后端设置) 将不需要登录cookie出现的背景是 HTTP是无连接的&#xff0c;无状态的, 半双工(http2.0以下), 所以需要一个媒介存在http中, 服务端可以操作, 客户端也可以…...

Ubuntu系统如何进行网络连接-连接电脑局域网-物联网开发-Ubuntu系统维护

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

STL库——Vector常见使用接口

一、介绍 1. vector是表示可变大小数组的序列容器&#xff0c;就像数组一样&#xff0c;vector也采用的连续存储空间来存储元素。也就是意味着可以采用下标对vector的元素 进行访问&#xff0c;和数组一样高效。但是又不像数组&#xff0c;它的大小是可以动态改变的&#xff0…...

将文件(File 对象)分割成多个块

如果要将文件&#xff08;File 对象&#xff09;分割成多个块&#xff0c;可以使用 JavaScript 中的 Blob 和 File 构造函数以及数组的 slice 方法。以下是一个示例&#xff1a; // 创建一个 File 对象&#xff0c;例如从文件输入框获取的文件 const file document.getElemen…...

若要对多态类进行深拷贝,应使用虚函数的clone,而不是公开的拷贝构造赋值

拷贝一个多态类可能会导致切片问题&#xff0c;为了解决这个问题&#xff0c;应覆盖一个虚clone函数&#xff0c;让他根据实际类型进行复制并返回一个到新对象的所有权的指针&#xff08;std::unique_ptr&#xff09;,在派生类&#xff0c;通过使用所谓的协变返回类型来返回派生…...

同构字符串(C++解法)

题目 给定两个字符串 s 和 t &#xff0c;判断它们是否是同构的。 如果 s 中的字符可以按某种映射关系替换得到 t &#xff0c;那么这两个字符串是同构的。 每个出现的字符都应当映射到另一个字符&#xff0c;同时不改变字符的顺序。不同字符不能映射到同一个字符上&#xf…...

『Linux升级路』基本指令

&#x1f525;博客主页&#xff1a;小王又困了 &#x1f4da;系列专栏&#xff1a;Linux &#x1f31f;人之为学&#xff0c;不日近则日退 ❤️感谢大家点赞&#x1f44d;收藏⭐评论✍️ 目录 一、认识操作系统 &#x1f4d2;1.1什么是操作系统 &#x1f4d2;1.2操作系统…...

python argparse解析参数

用法比较简单&#xff0c;直接看代码 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 从数字中能够得到什么&#xff1f;2.3 一个网络流传的笑话(转述)2.4 啤酒与尿布2.5 网上书店关联销售的案例2.6 数据挖掘在企业中的应用2.7 交叉销售 三、数据挖掘入门3.1 什么激发了数据挖掘…...

nodejs+vue 学生宿舍管理系统设计与实现

可将教师信息、宿管信息、学生信息、楼栋信息等输入到系统中。只有管理员才能录入相关的资料&#xff0c;按照提示&#xff0c;输入相应的资料&#xff0c;而“导入”则可以通过上传档案&#xff0c;导入成功后&#xff0c;相应的寝室就会相应的减少。在录入大楼的时候&#xf…...

汽车R155法规包含那些国家?

标签&#xff1a;R155法规国&#xff1b; R155强制标准&#xff1b;R155&#xff1b;UCNECE&#xff1b; R155是由联合国欧洲经济委员会&#xff08;UNECE&#xff09;的世界汽车行业论坛&#xff08;WP.29&#xff09;发布的法规&#xff0c;专门针对汽车的网络安全。因为它是…...

一个简易的低代码

前言 最近接手了一个低代码平台可视化大屏做二次开发&#xff0c;在这里做一些记录。 低代码平台简介&#xff1a;低代码平台是一种开发工具&#xff0c;它可以让开发人员使用简单的拖拽和配置来创建应用程序&#xff0c;而不需要编写大量的代码。低代码平台通常包括一个可视化…...

【JVM系列】- 类加载子系统与加载过程

类加载子系统与加载过程 &#x1f604;生命不息&#xff0c;写作不止 &#x1f525; 继续踏上学习之路&#xff0c;学之分享笔记 &#x1f44a; 总有一天我也能像各位大佬一样 &#x1f3c6; 博客首页 怒放吧德德 To记录领地 &#x1f31d;分享学习心得&#xff0c;欢迎指正…...

Amazon图片下载器:利用Scrapy库完成图像下载任务

概述 本文介绍了如何使用Python的Scrapy库编写一个简单的爬虫程序&#xff0c;实现从Amazon网站下载商品图片的功能。Scrapy是一个强大的爬虫框架&#xff0c;提供了许多方便的特性&#xff0c;如选择器、管道、中间件、代理等。本文将重点介绍如何使用Scrapy的图片管道和代理…...

Unity中Shader的Pass的复用

文章目录 前言一、怎么实现Pass的复用1、给需要引用的Pass给定特定的名字2、在需要引用 Pass 的Shader中&#xff0c;在Pass的平行位置使用 UsePass "ShaderPath PassName" 二、实现一个没被遮挡的部分显示模型原本的样子&#xff0c;遮挡部分显示模型的XRay效果1、…...

vue内容自适应方法

Vue中可以通过以下几种方式实现内容自适应&#xff1a; 使用CSS媒体查询&#xff1a;使用CSS媒体查询可以根据屏幕大小来动态改变元素的样式。例如&#xff0c;可以设置一个div元素在屏幕宽度小于600px时宽度为100%&#xff0c;在屏幕宽度大于600px时宽度为50%。 使用Vue的计算…...

RustDay05------Exercise[41-50]

41.使用模块的函数 mod 是用于创建模块的关键字。模块是一种组织代码的方式&#xff0c;它可以包含函数 (fn)、结构体 (struct)、枚举 (enum)、常量 (const)、其他模块 (mod) 等。模块用于组织和封装代码&#xff0c;帮助将代码分割成可管理的单元。模块可以形成层次结构&…...

C语言实现通讯录(超详细)

1.实现怎样一个通讯录 实现一个通讯录联系人信息&#xff1a;1.可以保存100个人的信息名字2.添加联系人年龄3.删除指定联系人性别4.查找指定联系人电话5.修改指定联系人住址6.排序联系人7.显示所有联系人信息 2.通讯录的实现 2.1创建两个源文件和一个头文件 首先我们创建con…...

【Python机器学习】零基础掌握MinCovDet协方差估计

如何更精准地评估资产的风险和收益? 在投资领域,资产的风险和收益评估是至关重要的。传统的协方差矩阵虽然在某种程度上能反映资产间的关联性,但也存在一定的局限性。例如如果样本数量较少,传统的协方差矩阵可能会出现偏差,从而影响投资决策。 假设现在有一个投资组合,…...

2023年【四川省安全员A证】模拟试题及四川省安全员A证作业模拟考试

题库来源&#xff1a;安全生产模拟考试一点通公众号小程序 2023年四川省安全员A证模拟试题为正在备考四川省安全员A证操作证的学员准备的理论考试专题&#xff0c;每个月更新的四川省安全员A证作业模拟考试祝您顺利通过四川省安全员A证考试。 1、【多选题】36V照明适用的场所条…...

Flask项目log的集成

一、引入log 在项目的init.py文件中&#xff1a; import logging from logging.handlers import RotatingFileHandlerfrom flask_wtf.csrf import CSRFProtect from flask import Flask from flask_sqlalchemy import SQLAlchemy from redis import StrictRedis from flask_s…...

河南企业网站建设/百度企业查询

华为荣耀4C从EMUI3.0安卓4.4升级到4.0 安卓版本升级到6.0&#xff0c;荣耀畅玩4C—升级教程。测试型号是CHM-TL00H &#xff0c;原系统版本是 EMUI系统3.0.安卓4.4&#xff0c;因为新版的微信以及其他APP很多都要求安卓5.0以上了&#xff0c;所以查询了网上的方法将老的华为荣耀…...

临朐昌大建设/杭州seo建站

站在空无一人略有冷意的街头&#xff0c;突然有种恍如隔世的感觉&#xff1a;这就是传说中橘生淮北则为枳的淮北&#xff1f;咦&#xff0c;我为什么会出现在这里&#xff1f; 于是我陷入了深深的思考。 关于对过去的思考 托尔斯泰说过&#xff1a;幸福的家庭是相似的&#xff…...

企业网上登记注册平台/seo软件视频教程

1_zclevel level     战场等级atitle     联盟给的头衔IDhtitle      部落给的头衔IDatitlestring    联盟给的头衔文字 一般做公告显示htitlestring    部落给的头衔文字一般做公告显示xp        升级需要经验值addspell      给予的BUFFaddtalent …...

怎么弄网站/广告营销公司

org.hibernate.cfg.Configuration实例代表了应用程序到SQL数据库的映射配置&#xff0c; Configuration对象提供了一个buildSessionFactory方法&#xff0c;该方法可以产生一个不可变的SessionFactory对象。 也可以直接实例化Configuration来获取一个实例&#xff0c;并为它指…...

双公示网站专栏建设/武汉百度推广公司

Java语言提供了很多修饰符&#xff0c;主要分为以下两类&#xff1a;访问修饰符非访问修饰符修饰符用来定义类、方法或者变量&#xff0c;通常放在语句的最前端。我们通过下面的例子来说明&#xff1a; public class className { // ...}private boolean myFlag;static final…...

公司网站的宣传栏怎么做/晨阳seo服务

文章目录计算方法代码实现计算方法 单纯矩阵normal matrix指的是符号ATAAATA^TAAA^TATAAAT的矩阵&#xff0c;他们的特征值互异。此外&#xff0c;单纯矩阵还有个特点&#xff0c;他们的特征空间彼此正交。   对于单纯矩阵&#xff0c;存在以下的谱定理Spectral theorem&…...