亲宝软件园·资讯

展开

springboot activiti配置项

FH_code 人气:2

springboot activiti 配置项

asyncExecutorEnabled属性设置

设置true后将代替那些老的Job executor

spring.activiti.async-executor-enabled=false
spring.activiti.job-executor-activate=false

asyncExecutorActivate

是指示activiti在流程引擎启动就激活AsyncExecutor,异步

spring.activiti.async-executor-activate=

校验流程文件

默认校验resources下的processes文件夹里的流程文件

spring.activiti.check-process-definitions=

使用自定义mybatis-mapper

spring.activiti.custom-mybatis-mappers=
spring.activiti.custom-mybatis-xmlmappers=

数据源指定

spring.activiti.database-schema=

建表规则

spring.activiti.database-schema-update=false

检测历史表是否存在

spring.activiti.db-history-used=false

检测身份信息表是否存在

spring.activiti.db-identity-used=false

流程部署名称

spring.activiti.deployment-name=

记录历史等级

可配置的历史级别有none, acitivity, audit, all

spring.activiti.history-level=

spring jpa使用

spring.activiti.jpa-enabled=false

邮件发送服务配置

spring.activiti.mail-server-default-from=
spring.activiti.mail-server-host=
spring.activiti.mail-server-password=
spring.activiti.mail-server-port=
spring.activiti.mail-server-use-ssl=
spring.activiti.mail-server-use-tls=
spring.activiti.mail-server-user-name=

自定义流程文件位置

spring.activiti.process-definition-location-prefix=
spring.activiti.process-definition-location-suffixes=

activiti rest 配置

spring.activiti.rest-api-enabled=false
spring.activiti.rest-api-mapping=
spring.activiti.rest-api-servlet-name=

springboot集成activiti基础配置

1、配置Maven

<dependency>
    <groupId>org.activiti</groupId>
    <artifactId>activiti-spring-boot-starter-basic</artifactId>
    <version>6.0.0</version>
</dependency>

2、配置环境变量

此处配置可以解决报 未找到bpmn资源文件异常。

spring.activiti.process-definition-location-prefix=classpath*:/processes/

在这里插入图片描述

3、配置解析方式,处理乱码

package com.oldguy.example.modules.workflow.configs;
import com.oldguy.example.modules.common.utils.Log4jUtils;
import org.activiti.spring.SpringProcessEngineConfiguration;
import org.activiti.spring.boot.ProcessEngineConfigurationConfigurer;
import org.springframework.stereotype.Component;
@Component
public class ProcessEngineConfiguration implements ProcessEngineConfigurationConfigurer {
    @Override
    public void configure(SpringProcessEngineConfiguration processEngineConfiguration) {
        processEngineConfiguration.setActivityFontName("宋体");
        processEngineConfiguration.setLabelFontName("宋体");
        processEngineConfiguration.setAnnotationFontName("宋体");
        Log4jUtils.getInstance(getClass()).info("配置字体:" + processEngineConfiguration.getActivityFontName());
    }
}

4、idea 集成BPMN开发工具

File - settings-plugins-Browse-Repositories 搜索 actiBPM

在这里插入图片描述

如果出现图片乱码,就需要修改编辑器环境变量

添加环境变量(不能出现空格):-Dfile.encoding=UTF-8

在这里插入图片描述

以上为个人经验,希望能给大家一个参考,也希望大家多多支持。

加载全部内容

相关教程
猜你喜欢
用户评论