• SpringBoot + Activiti7 整合页面


    1 效果图

    http://localhost:9991/modeler.html?modelId=1
    http://localhost:9991/modeler.html?modelId=1

    2 pom.xml

    
    <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.0modelVersion>
    
    	<parent>
    		<groupId>org.springframework.bootgroupId>
    		<artifactId>spring-boot-starter-parentartifactId>
    		<version>2.7.3version>
    		<relativePath/> 
    	parent>
    
    	<groupId>com.xu.activitigroupId>
    	<artifactId>SpringBootActivitiartifactId>
    	<version>0.0.1-SNAPSHOTversion>
    	<name>SpringBootActivityname>
    
    	<description>Demo project for Spring Bootdescription>
    
    	<properties>
    		<java.version>11java.version>
    		<activiti.version>7.1.0.M6activiti.version>
    		<project.build.sourceEncoding>UTF-8project.build.sourceEncoding>
    		<project.reporting.outputEncoding>UTF-8project.reporting.outputEncoding>
    	properties>
    
    	<dependencies>
    
    		<dependency>
    			<groupId>org.springframework.bootgroupId>
    			<artifactId>spring-boot-starter-webartifactId>
    		dependency>
    
    		<dependency>
    			<groupId>org.springframework.bootgroupId>
    			<artifactId>spring-boot-starter-testartifactId>
    			<scope>testscope>
    		dependency>
    
    		<dependency>
    			<groupId>org.springframework.bootgroupId>
    			<artifactId>spring-boot-starter-securityartifactId>
    		dependency>
    
    		<dependency>
    			<groupId>org.springframework.bootgroupId>
    			<artifactId>spring-boot-devtoolsartifactId>
    			<scope>runtimescope>
    			<optional>trueoptional>
    		dependency>
    
    		<dependency>
    			<groupId>mysqlgroupId>
    			<artifactId>mysql-connector-javaartifactId>
    			<scope>runtimescope>
    		dependency>
    
    		<dependency>
    			<groupId>org.projectlombokgroupId>
    			<artifactId>lombokartifactId>
    			<optional>trueoptional>
    		dependency>
    
    		
    		<dependency>
    			<groupId>org.activitigroupId>
    			<artifactId>activiti-json-converterartifactId>
    			<version>${activiti.version}version>
    		dependency>
    
    		
    		<dependency>
    			<groupId>org.activitigroupId>
    			<artifactId>activiti-bpmn-layoutartifactId>
    			<version>${activiti.version}version>
    		dependency>
    
    		
    		<dependency>
    			<groupId>org.activitigroupId>
    			<artifactId>activiti-bpmn-converterartifactId>
    			<version>${activiti.version}version>
    		dependency>
    
    		
    		<dependency>
    			<groupId>org.activitigroupId>
    			<artifactId>activiti-bpmn-modelartifactId>
    			<version>${activiti.version}version>
    		dependency>
    
    		
    		<dependency>
    			<groupId>org.activiti.apigroupId>
    			<artifactId>activiti-api-model-sharedartifactId>
    			<version>${activiti.version}version>
    		dependency>
    
    		<dependency>
    			<groupId>org.activitigroupId>
    			<artifactId>activiti-modelerartifactId>
    			<version>5.23.0version>
    		dependency>
    
    		<dependency>
    			<groupId>commons-iogroupId>
    			<artifactId>commons-ioartifactId>
    			<version>2.11.0version>
    		dependency>
    
    		<dependency>
    			<groupId>com.baomidougroupId>
    			<artifactId>mybatis-plus-boot-starterartifactId>
    			<version>3.5.2version>
    		dependency>
    
    		<dependency>
    			<groupId>org.activitigroupId>
    			<artifactId>activiti-spring-boot-starterartifactId>
    			<version>${activiti.version}version>
    		dependency>
    
    	dependencies>
    
    	<build>
    		<plugins>
    			<plugin>
    				<groupId>org.springframework.bootgroupId>
    				<artifactId>spring-boot-maven-pluginartifactId>
    				<configuration>
    					<excludes>
    						<exclude>
    							<groupId>org.projectlombokgroupId>
    							<artifactId>lombokartifactId>
    						exclude>
    					excludes>
    				configuration>
    			plugin>
    		plugins>
    	build>
    
    project>
    
    

    3 applocation.yml

    
    server:
      port: 9991
    
    spring:
      datasource:
        url: jdbc:mysql://127.0.0.1:3306/spring-boot-activity?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true
        username: root
        password: 123456
      devtools:
        restart:
          enabled: true
      # activiti配置
      activiti:
        #校验流程文件,自动部署验证设置:true-开启(默认)、false-关闭
        check-process-definitions: false
        #表示启动时检查数据库表,不存在则创建
        database-schema-update: true
        #表示哪种情况下使用历史表,这里配置为full表示全部记录历史,方便绘制流程图
        #记录历史等级 可配置的历史级别有none, activity, audit, full
        history-level: full
        #true表示使用历史表
        db-history-used: true
        # 关闭 SpringAutoDeployment
        deployment-mode:  never-fail
        # 是否使用uuid,false 不使用/ 默认是 true 使用
        use-strong-uuids: false
    
    

    4 执行顺序

    参考文章

    http://localhost:9991/modeler.html?modelId=1

    代码地址

    5 数据库脚本

    按上买了的applocation.yml配置会自动生成表
    在这里插入图片描述
    数据集脚本位于以下位置
    在这里插入图片描述

  • 相关阅读:
    MCN参考文档
    HLS学习之图像的二值化处理
    Vue图片懒加载
    嵌入式开发:ST-LINK V2.1仿真器,Type-C接口
    mysql获取重复数据最新一条,并显示重复数量
    提名 Apache ShardingSphere Committer,说说方法
    C打印内存16进制
    使用jQuery的extend方法扩展window自定义对象
    代码随想录算法训练营 day56|583. 两个字符串的删除操作、72. 编辑距离
    Swift新async/await并发中利用Task防止指定代码片段执行的数据竞争(Data Race)问题
  • 原文地址:https://blog.csdn.net/qq_34814092/article/details/126942165