springboot2.1.6整合activiti6.0(一)

一、pom

<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0modelVersion>
  <groupId>com.badcatgroupId>
  <artifactId>activiti_demoartifactId>
  <version>0.0.1-SNAPSHOTversion>
  
  <name>activiti_demoname>
  <description>springboot2.1.6整合activiti6.0description>
  
  <parent>
      <groupId>org.springframework.bootgroupId>
      <artifactId>spring-boot-starter-parentartifactId>
      <version>2.1.6.RELEASEversion>
      <relativePath/> 
  parent>
  
  <properties>
      <project.build.sourceEncoding>UTF-8project.build.sourceEncoding>
      <project.reporting.outputEncoding>UTF-8project.reporting.outputEncoding>
      <java.version>1.8java.version>
      <maven-jar-plugin.version>3.0.0maven-jar-plugin.version>
      <druid.version>1.1.14druid.version>
      <mysql.version>8.0.16mysql.version>
      <activiti.starter.version>6.0.0activiti.starter.version>
  properties>
  
  <dependencies>
  
    <dependency>
        <groupId>org.springframework.bootgroupId>
        <artifactId>spring-boot-starterartifactId>
    dependency>
    
    <dependency>
        <groupId>org.springframework.bootgroupId>
        <artifactId>spring-boot-starter-webartifactId>
    dependency>
    
    
    <dependency>
        <groupId>com.alibabagroupId>
        <artifactId>druid-spring-boot-starterartifactId>
        <version>${druid.version}version>
    dependency>
    
    
    <dependency>
        <groupId>mysqlgroupId>
        <artifactId>mysql-connector-javaartifactId>
        <version>${mysql.version}version>
    dependency>
    
    
    <dependency>
        <groupId>org.activitigroupId>
        <artifactId>activiti-spring-boot-starter-basicartifactId>
        <version>${activiti.starter.version}version>
    dependency>
  dependencies>
project>

二、application.properties

server.port=8087
server.tomcat.uri-encoding=UTF-8

spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
spring.datasource.url = jdbc:mysql://localhost/activiti?characterEncoding=utf8&useSSL=false&serverTimezone=UTC&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
spring.datasource.username = root
spring.datasource.password = 111111
spring.datasource.driverClassName = com.mysql.cj.jdbc.Driver

spring.datasource.initialSize=5
spring.datasource.minIdle=5
spring.datasource.maxActive=20
spring.datasource.maxWait=60000
spring.datasource.timeBetweenEvictionRunsMillis=60000
spring.datasource.minEvictableIdleTimeMillis=300000
spring.datasource.validationQuery=SELECT 1 FROM DUAL
spring.datasource.testWhileIdle=true
spring.datasource.testOnBorrow=false
spring.datasource.testOnReturn=false
spring.datasource.poolPreparedStatements=true
spring.datasource.maxPoolPreparedStatementPerConnectionSize=20
spring.datasource.filters=stat,wall
spring.datasource.connectionProperties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000


spring.activiti.check-process-definitions=false

三、Aplication.java

注意:@SpringBootApplication  后添加   exclude = {SecurityAutoConfiguration.class }

package com.badcat;


import org.activiti.spring.boot.SecurityAutoConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
    * 启动程序
 */
@SpringBootApplication(exclude = {SecurityAutoConfiguration.class })
public class Application
{
    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
}

 

四、运行Aplication.java,发现数据库多出了28张表

springboot2.1.6整合activiti6.0(一)_第1张图片

 

你可能感兴趣的:(springboot2.1.6整合activiti6.0(一))