a.服務安裝配置mysql
1.下載服務

2.安裝服務
2.1解壓后打開default.yml,配置數據源(服務默認是h2數據庫,現在改為mysql)


2.2替換h2的驅動包為mysql驅動包

2.3創建數據庫導入表,腳本在服務里找
位置:


2.4啟動bat文件

輸入網址:localhost:8080 ;賬號:demo 密碼:demo

成功后頁面:

b.整合springboot
1.pom依賴
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter</artifactId>
<version>7.15.0</version>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-rest</artifactId>
<version>7.15.0</version>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
<version>7.15.0</version>
</dependency>
2.yml配置(數據庫要和配置服務里面的一致,主要需要那些表)
spring: datasource: username: root password: root url: jdbc:mysql://localhost:3306/camunda?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai driver-class-name: com.mysql.cj.jdbc.Driver camunda.bpm: generic-properties.properties: javaSerializationFormatEnabled: true admin-user: id: demo password: demo run: cors: enabled: true allowed-origins: "*" server: port: 13579
3.頁面 :http://localhost:13579

成功后的頁面:

