SpringBoot2整合activiti6环境搭建

依赖

    <dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring-boot-starter-basic</artifactId>
<version>${activiti.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<!-- mysql驱动 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
</dependencies>

这里使用的springboot2.0.6的版本,activiti为6.0.0的版本

添加processes目录

SpringBoot集成activiti默认会从classpath下的processes目录下读取流程定义文件,所以需要在src/main/resources目录下添加processes目录,并在目录中创建流程文件

application.yml

spring:
activiti:
check-process-definitions: true #自动检查、部署流程定义文件
database-schema-update: true #自动更新数据库结构
#流程定义文件存放目录
process-definition-location-prefix: classpath:/processes/
#process-definition-location-suffixes: #流程文件格式
datasource:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/taosir_process?useUnicode=true&useSSL=false&characterEncoding=utf8
username : root
password : root
initsize : 10
maxActive : 20
minIdle : 10
maxWait : 120000
poolPreparedStatements : false
maxOpenPreparedStatements : -1
validationQuery : select 1
testOnborrow : true
testOnReturn : true
testWhileIdle : true
timeBetweenEvictionRunsMillis : 120000
server:
port: 8764

bpmn文件

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:tns="Examples" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" expressionLanguage="http://www.w3.org/1999/XPath" id="m1539757531057" name="" targetNamespace="Examples" typeLanguage="http://www.w3.org/2001/XMLSchema">
<process id="oneTaskProcess" isClosed="false" name="The One Task Process" processType="None">
<startEvent id="theStart"/>
<sequenceFlow id="flow1" sourceRef="theStart" targetRef="theTask"/>
<userTask activiti:assignee="${user}" activiti:exclusive="true" id="theTask" name="my task"/>
<sequenceFlow id="flow2" sourceRef="theTask" targetRef="theEnd"/>
<endEvent id="theEnd"/>
</process>
</definitions>

启动类,注意@SpringBootApplication注解需要设置exclude属性

package cn.zytao.taosir.process;

import org.activiti.spring.boot.SecurityAutoConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication(exclude = SecurityAutoConfiguration.class)
public class ProcessApplication {
public static void main(String[] args) {
SpringApplication.run(ProcessApplication.class, args);
}
}

SpringBoot2整合activiti6环境搭建的更多相关文章

  1. SSM整合之---环境搭建

    SSM整合---环境搭建 l  查询所有用户的信息,保存用户信息 1.pom.xml配置项目所需的jar包 <dependencies> <dependency> <gr ...

  2. 框架进行时——SSM整合基础环境搭建

    一.导入相关的依赖 1 <!--打war包--> 2 <packaging>war</packaging> 3 4 <!--版本锁定--> 5 < ...

  3. SpringBoot2 整合Nacos组件,环境搭建和入门案例详解

    本文源码:GitHub·点这里 || GitEE·点这里 一.Nacos基础简介 1.概念简介 Nacos 是构建以"服务"为中心的现代应用架构,如微服务范式.云原生范式等服务基础 ...

  4. 使用Maven搭建Struts2+Spring3+Hibernate4的整合开发环境

    做了三年多的JavaEE开发了,在平时的JavaEE开发中,为了能够用最快的速度开发项目,一般都会选择使用Struts2,SpringMVC,Spring,Hibernate,MyBatis这些开源框 ...

  5. JSP动态网站环境搭建应用中的详细步骤(Tomcat和Apache/IIS的整合)

    链接地址:http://www.cnblogs.com/dartagnan/archive/2011/03/25/2003426.html JSP动态网站环境搭建应用中的详细步骤(Tomcat和Apa ...

  6. 使用intellij idea搭建spring-springmvc-mybatis整合框架环境

    使用intellij idea搭建spring-springmvc-mybatis整合框架环境   1.打开idea,创建maven项目,File-New-Project 2.选择Maven,勾选Cr ...

  7. SSM(Spring+SpringMVC+Mybatis)框架环境搭建(整合步骤)(一)

    1. 前言 最近在写毕设过程中,重新梳理了一遍SSM框架,特此记录一下. 附上源码:https://gitee.com/niceyoo/jeenotes-ssm 2. 概述 在写代码之前我们先了解一下 ...

  8. Hibernate环境搭建+struts整合

    说明:本文档,是和struts2+hibernate的整合示例. lib下还有struts2的jar包,本示例没有显示.struts2的搭建参考struts2的环境搭建 一下载hibernate的ja ...

  9. [转]ssm整合1(环境搭建)

    1 MyEclipse+Tomcat+MAVEN+SVN项目完整环境搭建http://blog.csdn.net/zhshulin/article/details/307798732 apache-m ...

随机推荐

  1. [Angular] Angular CDK Intro

    1. Installl latest @angular/cli: sudo npm i -g @angular/cli@next The version I used is:6.0.0-rc.10 2 ...

  2. nginx tomcat glassfish session 复制配置

    1.nginx配置 [root@www1-nlb1 ~]# cat /usr/local/nginx/conf/nginx.conf | grep -v ^$ | grep -v ^# user  w ...

  3. html里显示中文乱码的解决的方法

    在HTML开头统一规范下编码格式: <meta http-equiv="Content-Type" content="text/html; charset=utf- ...

  4. swift初始化

    swift初始化 class INIT: NSObject { // 一个结构体的初始化 // 1.存储属性的初始化 struct Fahrenheit { var temperature :Doub ...

  5. Ajax的两种实现方式

    //ajax的jquery实现 function aclick(){//alert("測试一");var name = $("#userName").val() ...

  6. 怎样在注冊表禁用或打开windows系统右键菜单

    以下是禁用右键方法: 在HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer下  在右边的窗体中新 ...

  7. ubuntu14.04 安装LNMP

    新书上市<深入解析Android 5.0系统> 通常我们使用centos来组建LNMP,可是我们开发时多使用ubuntu的桌面版本号来调试,以下将具体介绍怎样在ubuntu上安装一套LNM ...

  8. 使用UIScrollView和UIPageControl做一个能够用手势来切换图片的效果

    利用UIScrollView的滚动效果来实现,先上图: 实现过程是:在viewController里先增加UIScrollView和UIPageControl: -(void) loadView { ...

  9. nyoj--635--Oh, my goddess(dfs)

    Oh, my goddess 时间限制:3000 ms  |  内存限制:65535 KB 难度:3 描述 Shining Knight is the embodiment of justice an ...

  10. Battle City

    Battle City Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7208   Accepted: 2427 Descr ...