码迷,mamicode.com
首页 > 编程语言 > 详细

springboot2.1.6整合activiti6.0(一)

时间:2020-04-01 19:36:42      阅读:93      评论:0      收藏:0      [点我收藏+]

标签:tab   odi   注意   rom   inf   mys   min   url   username   

一、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.0</modelVersion>
  <groupId>com.badcat</groupId>
  <artifactId>activiti_demo</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  
  <name>activiti_demo</name>
  <description>springboot2.1.6整合activiti6.0</description>
  
  <parent>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-parent</artifactId>
      <version>2.1.6.RELEASE</version>
      <relativePath/> <!-- lookup parent from repository -->
  </parent>
  
  <properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
      <java.version>1.8</java.version>
      <maven-jar-plugin.version>3.0.0</maven-jar-plugin.version>
      <druid.version>1.1.14</druid.version>
      <mysql.version>8.0.16</mysql.version>
      <activiti.starter.version>6.0.0</activiti.starter.version>
  </properties>
  
  <dependencies>
  
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter</artifactId>
    </dependency>
    
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    
    <!--阿里数据库连接池 -->
    <dependency>
        <groupId>com.alibaba</groupId>
        <artifactId>druid-spring-boot-starter</artifactId>
        <version>${druid.version}</version>
    </dependency>
    
    <!-- mysql -->
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>${mysql.version}</version>
    </dependency>
    
    <!-- activiti -->
    <dependency>
        <groupId>org.activiti</groupId>
        <artifactId>activiti-spring-boot-starter-basic</artifactId>
        <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(一)

标签:tab   odi   注意   rom   inf   mys   min   url   username   

原文地址:https://www.cnblogs.com/hmxs/p/12614492.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!