栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

1、activiti-整合SpringBoot 生成表

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

1、activiti-整合SpringBoot 生成表

1、导包 pom.xml



    4.0.0
    
        org.springframework.boot
        spring-boot-starter-parent
        1.5.9.RELEASE
         
    
    com.example
    demo
    0.0.1-SNAPSHOT
    demo
    Demo project for Spring Boot

    war

    
        1.8
        UTF-8
        UTF-8
    

    
        
            org.springframework.boot
            spring-boot-starter-web
        
        
            org.activiti
            activiti-spring-boot-starter-basic
            6.0.0
        
        
            org.springframework.boot
            spring-boot-starter-data-jpa
        
        
            org.springframework.boot
            spring-boot-starter-thymeleaf
        
        
            org.springframework.boot
            spring-boot-starter-test
            test
        

        
            org.activiti
            activiti-engine
            6.0.0
        
        
            org.slf4j
            slf4j-api
            1.7.21
        
        
            org.slf4j
            slf4j-log4j12
            1.7.21
        
        
            mysql
            mysql-connector-java
            5.1.46
        
        
            mysql
            mysql-connector-java
        
        
            org.springframework.boot
            spring-boot-starter-tomcat
        

        
            com.alibaba
            fastjson
            1.2.41
        

        
            org.projectlombok
            lombok
            1.16.20
            provided
        
    

    
        
            
                org.springframework.boot
                spring-boot-maven-plugin
            
            
                org.apache.tomcat.maven
                tomcat7-maven-plugin
                
                    8080
                    /activity
                    
                        4000
                    
                
            

        
    

2、环境配置 application.yml

spring:
  activiti:
    check-process-definitions: true #自动检查、部署流程定义文件
    database-schema-update: true  #自动更新数据库结构
    history-level: full  #保存历史数据级别设置为full最高级别,便于历史数据的追溯 还有两个级别activity与none
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    url: jdbc:mysql://localhost:3306/activiti-test?useUnicode=true&characterEncoding=utf-8&nullCatalogMeansCurrent=true
    username: root
    password: root

表生成后 要将 check-process-definitions: true 改成FALSE

3、启动类

package com.bzyc.activiti;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration;

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

    public static void main(String[] args) {

        SpringApplication.run(DemoApplication.class, args);
    }
}

启动后,刷新数据库会在数据库生成28张表

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/678377.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号