「DAY23」Camunda可能會有的問題
Camunda有一些配置項會跟電腦本身服務相衝,故筆者在此做這小結,並且後續會不定期更新。
端口衝突
camunda預設端口為8080
更改原生資料庫(mysql)
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:
- H2:
jdbc:h2:tcp://localhost/camunda
- MySQL:
jdbc:mysql://localhost:3306/camunda?autoReconnect=true&sendFractionalSeconds=false
- Oracle:
jdbc:oracle:thin:@localhost:1521:xe
- PostgreSQL:
jdbc:postgresql://localhost:5432/camunda
- DB2:
jdbc:db2://localhost:50000/camunda
- MSSQL:
jdbc:sqlserver://localhost:1433/camunda
- MariaDB:
jdbc:mariadb://localhost:3306/camunda
詳細可參考:
Database Configuration | docs.camunda.org
修改管理員帳號
我們只需要將下面的配置項修改即可
這是我的部落格,歡迎點擊閱覽喔~~會不定期更新文章