Camunda有一些配置項會跟電腦本身服務相衝,故筆者在此做這小結,並且後續會不定期更新。
camunda預設端口為8080
//change port
// application.yaml
server.port: 8090
camunda預設為H2資料庫
(1)pom.xml 將h2依賴項scope設定為test
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>test</scope>
</dependency>
(2)add mysql dependency
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.20</version>
</dependency>
(3)更改application.yaml
spring.datasource.url: jdbc:h2:file:./camunda-h2-database
spring:
datasource:
url:jdbc:mysql://localhost:3306/camunda?autoReconnect=true&sendFractionalSeconds=false
camunda.bpm.admin-user:
id: demo
password: demo
server:
port: 8090
Here are some sample JDBC urls:
jdbc:h2:tcp://localhost/camunda
jdbc:mysql://localhost:3306/camunda?autoReconnect=true&sendFractionalSeconds=false
jdbc:oracle:thin:@localhost:1521:xe
jdbc:postgresql://localhost:5432/camunda
jdbc:db2://localhost:50000/camunda
jdbc:sqlserver://localhost:1433/camunda
jdbc:mariadb://localhost:3306/camunda
詳細可參考:
Database Configuration | docs.camunda.org
我們只需要將下面的配置項修改即可
//application.yaml
camunda.bpm.admin-user:
id: demo
password: demo
如果有任何問題,歡迎在下方留言!! 筆者頭一回寫技術文,如果內容有誤,或者內容的呈現上有所缺陷,如果您願意,歡迎在下方留言給我呦~~
這是我的部落格,歡迎點擊閱覽喔~~會不定期更新文章