Camunda BPM 與 Spring Boot 集成示例
本示例是根據 camunda.org官網Spring Boot集成入門指引建立的。java
github地址:https://github.com/skayliu/CamundaSpringBootDemogit
##本示例組件github
一、Spring-Boot: (v2.2.1.RELEASE)web
二、Camunda BPM: (v7.12.0)spring
三、Camunda BPM Spring Boot Starter: (v3.2.1)sql
四、Spring Clound: (Greenwich.RELEASE)數據庫
五、JDK: (v1.8)springboot
六、Mysql: (v5.7)app
七、其餘見pom.xmlwebapp
1、用IDEA建立maven項目
- 添加Camunda和Spring Boot依賴項
- 添加一個主類做爲啓動Spring Boot應用程序的入口點。
-
<dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-dependencies</artifactId> <version>${spring-boot.version}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> <dependencies> <dependency> <groupId>org.camunda.bpm.springboot</groupId> <artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId> <version>${camunda.spring-boot.version}</version> </dependency> <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> </dependency> <dependency> <groupId>com.sun.xml.bind</groupId> <artifactId>jaxb-impl</artifactId> <version>2.2.3</version> </dependency> </dependencies>
2、將主類添加到咱們的Spring Boot應用程序中
@SpringBootApplication public class WebappExampleProcessApplication { public static void main(String... args) { SpringApplication.run(WebappExampleProcessApplication.class, args); } }
3、生成並運行
生成成功後能夠訪問:localhost:8080