Spring Boot 集成 Camunda 流程引擎
引入 spring-boot-start
在 maven pom.xml 文件中加入以下配置:
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter</artifactId>
<version>7.13.0</version>
</dependency>
或在 build.gradle 文件中加入以下配置:
compile 'org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter:7.13.0'
applicatioin.yml 配置
# camunda 工作流配置
camunda:
bpm:
enabled: true
以上配置可不配,引入Camunda 默认 enabled 为 true,运行后自动创建相关的数据库表,使用Spring Boot 默认数据源。
注入流程引擎相关的接口服务类
以下流程引擎服务类都可以直接通过@Resource或@Autowired。
我们接下来就会使用这些接口