SpringBoot整合activiti7实现简单的员工请假流程

news2024/9/22 19:46:14

Activiti 是一个开源架构的工作流引擎,基于bpmn2.0 标准进行流程定义。其前身是JBPM,Activiti 通过嵌入到业务系统开发中进行使用。

整合springboot

引入相关依赖

        <!-- 引入Activiti7 -->
        <dependency>
            <groupId>org.activiti</groupId>
            <artifactId>activiti-spring-boot-starter</artifactId>
            <version>7.1.0.M4</version>
            <exclusions>
                <exclusion>
                    <groupId>org.mybatis</groupId>
                    <artifactId>mybatis</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>2.2.0</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>

        <dependency>
            <groupId>com.mysql</groupId>
            <artifactId>mysql-connector-j</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>

配置yml

spring:
  # 数据源配置
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://127.0.0.1:3306/activiti?characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false&rewriteBatchedStatements=true
    username: root
    password: 159741
    type: com.zaxxer.hikari.HikariDataSource
    hikari:
      max-lifetime: 120000
  # activiti7配置
  activiti:
    # 自动部署验证设置:true-开启(默认)、false-关闭
    check-process-definitions: true
    # 保存历史数据
    history-level: full
    # 检测历史表是否存在
    db-history-used: true
    # 关闭自动部署,如果不关闭,每次重新启动项目的时候,总是会在 ACT_RE_DEPLOYMENT 自动创建一个名为 SpringAutoDeployment 工作流记录。
    deployment-mode: never-fail
    #    flase:       默认值。activiti在启动时,会对比数据库表中保存的版本,如果没有表或者版本不匹配,将抛出异常。(生产环境常用)
    #    true:        activiti会对数据库中所有表进行更新操作。如果表不存在,则自动创建。(开发时常用)
    #    create_drop: 在activiti启动时创建表,在关闭时删除表(必须手动关闭引擎,才能删除表)。(单元测试常用)
    #    drop-create: 在activiti启动时删除原来的旧表,然后在创建新表(不需要手动关闭引擎)。
    database-schema-update: true
    # 解决频繁查询SQL问题
    async-executor-activate: false

项目主类排除security相关依赖,否则启动会报错

@SpringBootApplication(exclude = {
        SecurityAutoConfiguration.class,
       ManagementWebSecurityAutoConfiguration.class
})
public class ActivitiApplication {

    public static void main(String[] args) {
        SpringApplication.run(ActivitiApplication.class, args);
    }

}

数据库建名为activiti的库,启动让Activiti表自动生成

 由于7.1.0.M4 版本自动生成的表字段不全所以需要添加2个字段

alter table ACT_RE_DEPLOYMENT add column PROJECT_RELEASE_VERSION_ varchar(255) DEFAULT NULL;
alter table ACT_RE_DEPLOYMENT add column VERSION_ varchar(255) DEFAULT NULL;

在resources目录下创建processes文件夹,在该目录下创建自己的bpmn文件,遵循命名规范,项目启动会进行自动部署

手动部署的方式

  //提供流程定义和部署等功能。比如说,实现流程的的部署、删除,暂停和激活以及流程的查询等功能
    @Autowired
    private RepositoryService repositoryService;
  //流程部署
 public void initDeployment() {
      
        Deployment deployment =repositoryService.createDeployment()
                .addClasspathResource("bpmn/Leave.bpmn")
                .addClasspathResource("bpmn/Leave.myleave.png")
                .name("流程部署测试")
                .deploy();
        System.out.println("流程部署名称:" + deployment.getName());
 System.out.println("流程部署名称:" + deployment.getId());
    }

  //流程部署zip形式(zip若添加图片类型,则需要遵循命名规范,bpmn/Leave.bpmn,bpmn/Leave.myleave.png)
 public void initDeployment() {
      
               InputStream inputStream = this.getClass().getClass().getClassLoader()
                .getResourceAsStream("bpmn/Leave.zip");
        ZipInputStream zipInputStream = new ZipInputStream(inputStream);
        Deployment deployment = repositoryService.createDeployment()
                .addZipInputStream(zipInputStream)
                .name("流程部署测试")
                .deploy();
        System.out.println("流程部署名称:" + deployment.getName());
        System.out.println("流程部署名称:" + deployment.getId());
    }

 构建bpmn文件

xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
             xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI"
             xmlns:activiti="http://activiti.org/bpmn"
             xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"
             xmlns:tns="http://www.activiti.org/test"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema"
             xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             expressionLanguage="http://www.w3.org/1999/XPath"
             id="m1686980591933"
             name=""
             targetNamespace="http://www.activiti.org/test"
             typeLanguage="http://www.w3.org/2001/XMLSchema">
   <process  id="myleave" isClosed="false" isExecutable="true" name="员工请假申请流程"
            processType="None">
      <startEvent id="_2" name="请假流程"/>
      <userTask activiti:assignee="${leave.userId}" activiti:exclusive="true" id="_3"
                name="员工请假申请"/>
      <sequenceFlow id="_4" sourceRef="_2" targetRef="_3"/>
      <userTask activiti:assignee="${leave.approver1}" activiti:exclusive="true" id="_7"
                name="技术组长"/>
      <userTask activiti:assignee="${leave.approver2}" activiti:exclusive="true" id="_8"
                name="项目经理"/>
      <sequenceFlow id="_10" sourceRef="_3" targetRef="_7"/>
      <sequenceFlow id="_11" sourceRef="_7" targetRef="_8"/>
      <exclusiveGateway gatewayDirection="Unspecified" id="_12" name="ExclusiveGateway"/>
      <sequenceFlow id="_5" sourceRef="_8" targetRef="_12"/>
      <userTask activiti:assignee="${leave.approver3}" activiti:exclusive="true" id="_6"
                name="总经理"/>
      <sequenceFlow id="_9" name="大于等于3天" sourceRef="_12" targetRef="_6">
         <conditionExpression xsi:type="tFormalExpression">${leave.num&gt;=3}</conditionExpression>
      </sequenceFlow>
      <endEvent id="_13" name="EndEvent"/>
      <sequenceFlow id="_14" name="小于3天" sourceRef="_12" targetRef="_13">
         <conditionExpression xsi:type="tFormalExpression">${leave.num&lt;3}</conditionExpression>
      </sequenceFlow>
      <sequenceFlow id="_15" sourceRef="_6" targetRef="_13"/>
   </process>
   <bpmndi:BPMNDiagram xmlns=""
                       documentation="background=#3C3F41;count=1;horizontalcount=1;orientation=0;width=842.4;height=1195.2;imageableWidth=832.4;imageableHeight=1185.2;imageableX=5.0;imageableY=5.0"
                       id="Diagram-_1"
                       name="New Diagram">
      <bpmndi:BPMNPlane bpmnElement="myleave">
         <bpmndi:BPMNShape bpmnElement="_2" id="Shape-_2">
            <omgdc:Bounds height="32.0" width="32.0" x="25.0" y="20.0"/>
            <bpmndi:BPMNLabel>
               <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/>
            </bpmndi:BPMNLabel>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNShape bpmnElement="_3" id="Shape-_3">
            <omgdc:Bounds height="55.0" width="85.0" x="135.0" y="20.0"/>
            <bpmndi:BPMNLabel>
               <omgdc:Bounds height="55.0" width="85.0" x="0.0" y="0.0"/>
            </bpmndi:BPMNLabel>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNShape bpmnElement="_7" id="Shape-_7">
            <omgdc:Bounds height="55.0" width="85.0" x="140.0" y="115.0"/>
            <bpmndi:BPMNLabel>
               <omgdc:Bounds height="55.0" width="85.0" x="0.0" y="0.0"/>
            </bpmndi:BPMNLabel>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNShape bpmnElement="_8" id="Shape-_8">
            <omgdc:Bounds height="55.0" width="85.0" x="145.0" y="215.0"/>
            <bpmndi:BPMNLabel>
               <omgdc:Bounds height="55.0" width="85.0" x="0.0" y="0.0"/>
            </bpmndi:BPMNLabel>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNShape bpmnElement="_12" id="Shape-_12" isMarkerVisible="false">
            <omgdc:Bounds height="32.0" width="32.0" x="270.0" y="220.0"/>
            <bpmndi:BPMNLabel>
               <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/>
            </bpmndi:BPMNLabel>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNShape bpmnElement="_6" id="Shape-_6">
            <omgdc:Bounds height="55.0" width="85.0" x="330.0" y="150.0"/>
            <bpmndi:BPMNLabel>
               <omgdc:Bounds height="55.0" width="85.0" x="0.0" y="0.0"/>
            </bpmndi:BPMNLabel>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNShape bpmnElement="_13" id="Shape-_13">
            <omgdc:Bounds height="32.0" width="32.0" x="380.0" y="285.0"/>
            <bpmndi:BPMNLabel>
               <omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/>
            </bpmndi:BPMNLabel>
         </bpmndi:BPMNShape>
         <bpmndi:BPMNEdge bpmnElement="_15" id="BPMNEdge__15" sourceElement="_6" targetElement="_13">
            <omgdi:waypoint x="396.0" y="205.0"/>
            <omgdi:waypoint x="396.0" y="285.0"/>
            <bpmndi:BPMNLabel>
               <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
            </bpmndi:BPMNLabel>
         </bpmndi:BPMNEdge>
         <bpmndi:BPMNEdge bpmnElement="_14" id="BPMNEdge__14" sourceElement="_12" targetElement="_13">
            <omgdi:waypoint x="302.0" y="236.0"/>
            <omgdi:waypoint x="380.0" y="301.0"/>
            <bpmndi:BPMNLabel>
               <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
            </bpmndi:BPMNLabel>
         </bpmndi:BPMNEdge>
         <bpmndi:BPMNEdge bpmnElement="_4" id="BPMNEdge__4" sourceElement="_2" targetElement="_3">
            <omgdi:waypoint x="57.0" y="36.0"/>
            <omgdi:waypoint x="135.0" y="47.5"/>
            <bpmndi:BPMNLabel>
               <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
            </bpmndi:BPMNLabel>
         </bpmndi:BPMNEdge>
         <bpmndi:BPMNEdge bpmnElement="_5" id="BPMNEdge__5" sourceElement="_8" targetElement="_12">
            <omgdi:waypoint x="230.0" y="242.5"/>
            <omgdi:waypoint x="270.0" y="236.0"/>
            <bpmndi:BPMNLabel>
               <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
            </bpmndi:BPMNLabel>
         </bpmndi:BPMNEdge>
         <bpmndi:BPMNEdge bpmnElement="_9" id="BPMNEdge__9" sourceElement="_12" targetElement="_6">
            <omgdi:waypoint x="302.0" y="236.0"/>
            <omgdi:waypoint x="330.0" y="177.5"/>
            <bpmndi:BPMNLabel>
               <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
            </bpmndi:BPMNLabel>
         </bpmndi:BPMNEdge>
         <bpmndi:BPMNEdge bpmnElement="_11" id="BPMNEdge__11" sourceElement="_7" targetElement="_8">
            <omgdi:waypoint x="185.0" y="170.0"/>
            <omgdi:waypoint x="185.0" y="215.0"/>
            <bpmndi:BPMNLabel>
               <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
            </bpmndi:BPMNLabel>
         </bpmndi:BPMNEdge>
         <bpmndi:BPMNEdge bpmnElement="_10" id="BPMNEdge__10" sourceElement="_3" targetElement="_7">
            <omgdi:waypoint x="180.0" y="75.0"/>
            <omgdi:waypoint x="180.0" y="115.0"/>
            <bpmndi:BPMNLabel>
               <omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
            </bpmndi:BPMNLabel>
         </bpmndi:BPMNEdge>
      </bpmndi:BPMNPlane>
   </bpmndi:BPMNDiagram>
</definitions>

需要的entity

@Data
public class Leave implements Serializable {
    //申请人id
    private Integer userId;
    //申请天数
    private Integer num;
    //请假原因
    private  String reason;
    //技术组长审批
    private  Integer  approver1;
    //项目经理审批
    private  Integer  approver2;
    //总经理审批
    private  Integer  approver3;
    //总经理审批
    private  String  taskId;
}

Controller包含整个流程

@RestController
@RequestMapping("/leave")
public class LeaveController {

    //RuntimeService:提供了处理流程实例不同步骤的结构和行为。包括启动流程实例、暂停和激活流程实例等功能
    @Autowired
    private RuntimeService runtimeService;

   //TaskService:提供有关任务相关功能的服务。包括任务的查询、删除以及完成等功能
    @Autowired
    private TaskService taskService;

 //HistoryService:提供 Activiti 引擎收集的历史记录信息服务。主要用于历史信息的查询功能
    @Autowired
    private HistoryService historyService;


    //activiti核心对象可提供各个ActivitiService
   @Autowired
    private ProcessEngine processEngine;
    /**
     * 启动流程
     * @param userId
     * @return
     */
    @GetMapping("/start")
    public String start(@RequestParam Integer userId){
        Map<String, Object> vars = new HashMap<>();
        Leave leave = new Leave();
        leave.setUserId(userId);
        vars.put("leave",leave);
         runtimeService.startProcessInstanceByKey("myleave",vars);
        return "流程启动成功!";
    }

    /**
     * 申请请假
     * @param leave
     * @return
     */
    @PostMapping(value="/apply")
    public String apply(@RequestBody Leave leave){
        Map<String, Object> vars = new HashMap<>();
        vars.put("leave", leave);
        taskService.setVariables(leave.getTaskId(),vars);
        taskService.complete(leave.getTaskId());

        return "申请成功!";
    }

    /**
     * 查询用户流程
     * @param userId
     * @return
     */
    @GetMapping("/queryTask")
    public Map<String, Object> find(@RequestParam("userId")String userId) throws JsonProcessingException {
        List<Task> taskList = taskService.createTaskQuery().taskAssignee(userId).list();
        List<Leave> resultList = new ArrayList<>();
        if(!CollectionUtils.isEmpty(taskList)){
            for(Task task : taskList){
                //获取指定任务id,leave前缀的信息
                Object leave = taskService.getVariable(task.getId(), "leave");
                ObjectMapper objectMapper = new ObjectMapper();
                Leave leave1 = objectMapper.readValue(leave.toString(), Leave.class);
                leave1.setTaskId(task.getId());
                leave1.setTaskId(task.getId());
                resultList.add(leave1);
            }
        }
        Map<String, Object> resultMap = new HashMap<>();
        resultMap.put("data", resultList);
        return resultMap;
    }

    /**
     * 技术组长审批
     * @param leave
     * @return
     */
    @PostMapping(value = "/approve1")
    public String approve1(@RequestBody Leave leave){
        taskService.complete(leave.getTaskId());
        return "组长审批通过!";
    }

    /**
     * 项目经理审批
     * @param leave
     * @return
     */
    @PostMapping(value = "/approve2")
    public String approve2(@RequestBody Leave leave){
        taskService.complete(leave.getTaskId());
        return "项目经理审批通过!";
    }
    /**
     * 总经理审批
     * @param leave
     * @return
     */
    @PostMapping(value = "/approve3")
    public String approve3(@RequestBody Leave leave){
        taskService.complete(leave.getTaskId());
        return "总经理审批通过!";
    }
    /**
     * 查看历史记录
     * @param userId
     * @return
     */
    @GetMapping("/queryHistory")
    public Map<String, Object> findClosed(String userId){
//        1.根据部署对象ID删除流程定义
//
//        repositoryService.deleteDeployment(deploymentId, true);
//
//        2.删除历史流程实例根据流程实例ID
//
//        historyService.deleteHistoricProcessInstance(processInstan);
//
//        3.删除正在运行中的流程根据流程实例ID
//        runtimeService.deleteProcessInstance(processInstanceId,"");

        HistoryService historyService = processEngine.getHistoryService();

        List<HistoricProcessInstance> list = historyService.createHistoricProcessInstanceQuery().processDefinitionKey("myleave").variableValueEquals("leave.userId",userId).list();
        List<Leave> leaves = new ArrayList<>();
        for(HistoricProcessInstance pi : list){
            leaves.add((Leave) pi.getProcessVariables().get("leave"));
        }
        Map<String, Object> resultMap =new HashMap<>();
        resultMap.put("data", leaves);
        return resultMap;
    }

按流程测试

1.启动流程

2.申请人查询自己的任务

 3.申请人提交请假申请

 4.技术组长查看自己任务

 5.技术组长审批

6.项目经理查看自己任务

 7.项目经理审批

 由于请假日期不超过3天,到此流程就结束了。

以上就是工作流的一个简单例子。

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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

什么是2.5G和5G多千兆端口?

概要 在当前数字化时代&#xff0c;对于高速数据传输和网络连接的需求不断增长。为了满足这种需求&#xff0c;网络技术也在不断发展和进步。2.5G和5G多千兆端口是一种新型的网络连接技术&#xff0c;提供了比传统千兆以太网更高的传输速率和带宽。本文将详细介绍 的定义、工作…

[元带你学: eMMC协议详解 15] 写保护(Write Protect)详解

依JEDEC eMMC 5.1及经验辛苦整理&#xff0c;付费内容&#xff0c;禁止转载。 所在专栏 《元带你学: eMMC协议详解》 内容摘要 全文 1300字&#xff0c; 主要讲述写保护的用法&#xff0c; 写保护的类型。 Write Protect Management 为了允许主机保护数据不被擦除或覆盖写入&…

vue-server-renderer实现服务端渲染

vue-server-renderer实现服务端渲染 简单认识vue-server-renderer&#xff1a; 是 Vue.js 官方提供的一个库&#xff0c;用于将 Vue 组件渲染成 HTML 字符串或流&#xff0c;通常用于服务端渲染。 具体的咱们vue-server-renderer如何实现 1、预编译组件&#xff1a;根据 Vue …

云安全技术(一)之什么是云计算

对于在云环境中工作的安全专家而言&#xff0c;从传统数据中心模型获得的许多知识和最佳实践仍然适用于云计算环境&#xff0c;但安全专家对云计算概念、不同类型的云模型和云服务的深入理解对于成功实施和监督(Overseeing)安全策略和合规性至关重要。 什么是云计算 1.1 云计…

扫码枪(扫描枪)扫码在vue中的使用教学

1.扫描枪使用原理浅析。 扫描枪的使用原理其实很简单&#xff1a;就是把光信号转换成电信号&#xff0c;再将电信号通过模拟数字转换器转化为数字信号传输到计算机中处理。其实可以简单理解为&#xff1a;二维码/条形码 转换成 字符串。 2.扫描枪功能开发前准备。 正所谓“工…

关于【C语言】中scanf与getchar的用法和常见错误详解

写这篇博客的起因是最近博主自己学习中总是遇到类似的错误&#xff0c;并曾百思不得其解。 今天分享出来是希望帮助大家在写代码时避免这些错误。话不多说&#xff0c;我们直接开始吧&#xff01; 君兮_的个人主页 勤时当勉励 岁月不待人 C/C 游戏开发 输入函数scanf与getcha…

[架构之路-213]- 架构 - 架构设计过程快速概览与在线画图工具

目录 第一步&#xff1a;业务系统 &#xff08;1&#xff09;收集目标系统的用户需求 &#xff08;2&#xff09;定义用例图 第二步 领域建模 &#xff08;1&#xff09;业务流程定义 &#xff08;2&#xff09;业务功能分解 &#xff08;3&#xff09;非功能性架构&…

贝莱德出手了!

* * * 原创&#xff1a;刘教链 * * * 号外&#xff1a;今天在“刘教链Pro”发表了头条《内参&#xff1a;贝莱德向SEC申请的究竟是BTC信托还是现货ETF&#xff1f;信托和ETF的5点关键区别》&#xff0c;以及次条《私钥争夺战》&#xff0c;欢迎关注公众号“刘教链Pro”并阅读。…

mysql压缩包方式安装、data数据恢复

前言 最近电脑重装了系统&#xff0c;C盘彻底格式化了&#xff0c;但是D盘中的文件还是保留了下来。 我的MySQL的数据都在D盘了&#xff0c;想要重新恢复MySQL&#xff0c;还是很简单的&#xff1a; 重新安装Mysql将源数据拷贝到新的Mysql的data目录下 顺便记录一下MySQL压缩…

遥感数字图像处理教程复习整理

目录 01 说明 遥感影像的存储方式 BSQ方式 BIL方式 BIP方式 如何计算图像存储空间大小(字节数)&#xff1f; 简单的单位换算 计算公式 简单地 复杂地 如何查看影像的基本信息/辅助信息&#xff1f; 如何进行直方图的阈值分割&#xff1f; 辐射校正 系统辐射校正 …

SonarQube社区版安装插件实现扫描多分支

社区版不支持扫描多分支 社区版不支持扫描多分支&#xff0c;收费版才支持&#xff0c;开源社区有插件可以实现多分支的扫描 插件下载 点击此处跳转下载地址 我的SonarQube是安装的最新版本10&#xff0c;下载的插件版本也是最新的1.14.0&#xff0c;切记下载相对应支持的插件…

html学习与总结表单input系列标签

文章目录 表单标签input系列标签表单input总结button按钮标签select下拉菜单标签textarea文本域标签label标签 表单标签 input系列标签 标签属性说明inputtext文本框inputpassword密码框inputradio单选框inputcheckbok复选框 checked 默认选中inputfile文件上传 multiple 设置…

springboot整合spring-data-redis

前言 其实&#xff0c;整合是一个循序渐进的学习&#xff0c;你肯定是要了解之前底层的相关知识&#xff0c;才能够具体知道现在框架方法api到底tm有什么作用&#xff0c;所以建议先看看我之前的redis博客。 可以不看&#xff0c;但是可以以我这个为目录&#xff0c;针对性得…

python图像处理实战(二)—图像几何变换

&#x1f680;写在前面&#x1f680; &#x1f58a;个人主页&#xff1a;https://blog.csdn.net/m0_52051577?typeblog &#x1f381;欢迎各位大佬支持点赞收藏&#xff0c;三连必回&#xff01;&#xff01; &#x1f508;本人新开系列专栏—python图像处理 ❀愿每一个骤雨初…

Python接口自动化测试实战

目录 前言&#xff1a; 1.接口定义&#xff1a; 2.基本流程 3.需求分析 4.用例设计 5.脚本开发 5.3结果校验 6.结果分析 前言&#xff1a; Python是一款在自动化测试领域应用广泛的编程语言。通过使用Python的测试框架&#xff08;如unittest和pytest&#xff09;&…

【第一次】21级计科计算机组成原理课外练习

【第一次】21级计科计算机组成原理课外练习 一、判断题二、单选题三、多选题四、主观题 一、判断题 1-1 国防科技大学成功研制的“银河-II”通用并行巨型机的峰值速度超过同为国防科技大学研制的“天河一号”超级计算机。 错误 1-2 目前高端光刻机技术被荷兰ASML公司垄断&…

简要介绍 | 行人重识别 Person Re-identification

注1&#xff1a;本文系“简要介绍”系列之一&#xff0c;仅从概念上对行人重识别进行非常简要的介绍&#xff0c;不适合用于深入和详细的了解。 注2&#xff1a;“简要介绍"系列的所有创作均使用了AIGC工具辅助” 探索行人重识别技术&#xff1a;原理、挑战与未来展望 行人…

数字IC前端学习笔记:仲裁轮询(二)

相关文章 数字IC前端学习笔记&#xff1a;LSFR&#xff08;线性反馈移位寄存器&#xff09; 数字IC前端学习笔记&#xff1a;跨时钟域信号同步 数字IC前端学习笔记&#xff1a;信号同步和边沿检测 数字IC前端学习笔记&#xff1a;锁存器Latch的综合 数字IC前端学习笔记&am…

【代码阅读软件】VSCode最新版本 下载、安装、配置

目录 一、概述二、安装 VSCode 详细步骤三、基础配置3.1 安装中文插件3.2 安装其他插件 一、概述 VSCode 全称是 Visual Studio Code&#xff0c;是一款免费且开源的现代化代码编辑器&#xff0c;几乎支持所有主流开发语言的语法高亮、智能代码补全、代码片段提示、自定义快捷键…

(2023,网络修剪)探索 few-shot 图像生成中的不相容知识迁移

Exploring Incompatible Knowledge Transfer in Few-shot Image Generation 公众号&#xff1a;EDPJ 目录 0. 摘要 1. 简介 2. 相关工作 3. 基础 4. FSIG 中不兼容的知识转移 4.1 调查不相容的知识 4.2 实验设置 4.3 结果和分析 5. 建议的方法 5.1 通过网络修剪进…