springboot 集成 activiti 流程引擎

1. pom

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.2</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>
<shiro.version>1.4.0</shiro.version>
<activiti.version>6.0.0</activiti.version>
<batik.version>1.7</batik.version>
<maven-jar-plugin.version>3.0.0</maven-jar-plugin.version>
</properties>

        <!-- activiti -->
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring-boot-starter-basic</artifactId>
<version>${activiti.version}</version>
<exclusions>
        <exclusion>
          <groupId>de.odysseus.juel</groupId>
          <artifactId>juel-spi</artifactId>
        </exclusion>
        <exclusion>
          <groupId>de.odysseus.juel</groupId>
          <artifactId>juel-api</artifactId>
        </exclusion>
      </exclusions>
</dependency>
 <dependency>
    <groupId>org.activiti</groupId>
    <artifactId>activiti-json-converter</artifactId>
    <version>${activiti.version}</version>
</dependency>
<!-- batik start -->
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-anim -->
<dependency>
    <groupId>org.apache.xmlgraphics</groupId>
    <artifactId>batik-anim</artifactId>
    <version>${batik.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-awt-util -->
<dependency>
    <groupId>org.apache.xmlgraphics</groupId>
    <artifactId>batik-awt-util</artifactId>
    <version>${batik.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-bridge -->
<dependency>
    <groupId>org.apache.xmlgraphics</groupId>
    <artifactId>batik-bridge</artifactId>
    <version>${batik.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-codec -->
<dependency>
    <groupId>org.apache.xmlgraphics</groupId>
    <artifactId>batik-codec</artifactId>
    <version>${batik.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-css -->
<dependency>
    <groupId>org.apache.xmlgraphics</groupId>
    <artifactId>batik-css</artifactId>
    <version>${batik.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-dom -->
<dependency>
    <groupId>org.apache.xmlgraphics</groupId>
    <artifactId>batik-dom</artifactId>
    <version>${batik.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-ext -->
<dependency>
    <groupId>org.apache.xmlgraphics</groupId>
    <artifactId>batik-ext</artifactId>
    <version>${batik.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-gvt -->
<dependency>
    <groupId>org.apache.xmlgraphics</groupId>
    <artifactId>batik-gvt</artifactId>
    <version>${batik.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-js -->
<dependency>
    <groupId>org.apache.xmlgraphics</groupId>
    <artifactId>batik-js</artifactId>
    <version>${batik.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-parser -->
<dependency>
    <groupId>org.apache.xmlgraphics</groupId>
    <artifactId>batik-parser</artifactId>
    <version>${batik.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-script -->
<dependency>
    <groupId>org.apache.xmlgraphics</groupId>
    <artifactId>batik-script</artifactId>
    <version>${batik.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-svg-dom -->
<dependency>
    <groupId>org.apache.xmlgraphics</groupId>
    <artifactId>batik-svg-dom</artifactId>
    <version>${batik.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-svggen -->
<dependency>
    <groupId>org.apache.xmlgraphics</groupId>
    <artifactId>batik-svggen</artifactId>
    <version>${batik.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-transcoder -->
<dependency>
    <groupId>org.apache.xmlgraphics</groupId>
    <artifactId>batik-transcoder</artifactId>
    <version>${batik.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-util -->
<dependency>
    <groupId>org.apache.xmlgraphics</groupId>
    <artifactId>batik-util</artifactId>
    <version>${batik.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-xml -->
<dependency>
    <groupId>org.apache.xmlgraphics</groupId>
    <artifactId>batik-xml</artifactId>
    <version>${batik.version}</version>
</dependency>

2. 配置类

package org.fh.config;

import org.activiti.spring.SpringProcessEngineConfiguration;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.PlatformTransactionManager;

import javax.sql.DataSource;

/**
 * 说明:Activiti配置
 * 作者:FH Admin
 * from:www.fhadmin.cn
 */
@Controller
@Configuration
public class ActivitiConfig {

@Autowired
PlatformTransactionManager transactionManager;

@Autowired
ApplicationContext applicationContext;

@Bean
public SpringProcessEngineConfiguration getProcessEngineConfiguration() {
DataSource dataSource = applicationContext.getBean(DataSource.class);
SpringProcessEngineConfiguration config = new SpringProcessEngineConfiguration();
config.setDataSource(dataSource);
config.setDbIdentityUsed(false);
config.setTransactionManager(transactionManager);
/**设置字体**/
config.setActivityFontName("宋体");
config.setLabelFontName("宋体");
config.setAnnotationFontName("宋体");
config.setDatabaseType("oracle");
return config;
}

}
(0)

相关推荐

  • Maven项目管理工具:Maven依赖

    Maven是一款优秀的依赖管理工具,那么什么是依赖呢? 通俗的说,如果一个Maven构建所产生的构件(例如Jar文件)被其他项目引用,那么该构件就是其他项目的依赖. 依赖声明 Maven坐标是依赖的前 ...

  • springboot 整合 flowable 流程引擎

    springboot 整合 flowable 流程引擎

  • 搜索引擎springboot集成(elasticSearch)

    各位小伙伴们,今天是今年的最后一天,这是我今年的最后一篇博客,在这里祝大家新年快乐!本次讲的是近几年比较流行的search搜索引擎,本文写的比较粗略,希望大家看了会有所收获,如若写错,请在评论区指出, ...

  • 评估工作流程引擎的30个关键技术点

    1.1:支持国际化 1.如果使用工具包的模式开发,支持国际化的工作由自己完成的. 2.如果使用Ccbpm 的前端,主要的功能页面已经支持, 3.后台的设置的页面全部中文,没有做支持国际化. 1.2:能 ...

  • dubbo实战之二:与SpringBoot集成

    欢迎访问我的GitHub https://github.com/zq2599/blog_demos 内容:所有原创文章分类汇总及配套源码,涉及Java.Docker.Kubernetes.DevOPS ...

  • SpringBoot集成Redis

    根据学生 id 查询学生的功能,先从 redis 缓存中查找,如果找不到,再从数据库中查找,然后放到 redis 缓存中 一.通过 MyBatis 逆向工程生成实体 bean 和数据持久层 具体过程看 ...

  • SpringBoot集成Dubbo

    一.基本步骤 1. Dubbo服务接口 创建一个接口项目,12-springboot-dubbo-interface,该项目只定义接口和model类 1.创建普通的Maven项目,dubbo服务接口工 ...

  • (1条消息) springboot(集成篇):RabbitMQ集成详解

    RabbitMQ 即一个消息队列,主要是用来实现应用程序的异步和解耦,同时也能起到消息缓冲,消息分发的作用. 消息中间件在互联网公司的使用中越来越多,刚才还看到新闻阿里将RocketMQ捐献给了apa ...

  • 模拟集成电路设计流程(7)——ESD简介

    静电防护理论与技术 作者:薛兵 当当 [免责声明] 本公众号的主体为个人,作者在本公众号发表的所有文章均是出于交流学习的目的,对于声明原创的文章,欢迎任何人转载分享,但须注明出处. 作者在该公众号发表 ...

  • springboot集成shiro的示例分析

    我们开发时候有时候要把传统spring shiro转成spring boot项目,或者直接集成,name我们要搞清楚一个知识,就是 xml配置和spring bean代码配置的关系,这一点很重要,因为 ...