Spring Boot Camunda 配置:作业执行器、数据库隔离级别、ID生成器、日志


我是基于7.16.0来说的
这些配置主要是在嵌入式流程引擎下才需要进行配置,具体可以见官方文档:

作业执行器:

嵌入式下默示是关闭的

job-execution .enabled

数据库隔离级别

mysql默认RR如果不是RC的话,可能会出现死锁的情况

ID生成器

生产环境推荐使用uuid生成器,我这里直接增加id-generator即可,不用按照官方的没有增加其他配置

 id-generator: strong

日志记录配置

如果使用的是logback的话直接在yml中配置logging就可以了

logging:
  level:
  #debug级别可以打印执行Sql
    org.camunda: debug

我的配置文件

camunda:
  bpm:
    admin-user:
      id: demo
      password: demo
    filter:
      create: All tasks
    database:
      schema-update: false
    webapp:
      enabled: true
    job-execution:
      # 作业执行器——定时任务
      enabled: true
    # 历史日志记录级别
    history-level: full
    # 自动部署
    #这里配置了没有用,要去spring boot的启动类中注释@EnableProcessApplication
    auto-deployment-enabled: false
    # id 生成器 UUID 生成器;目前我用的7.16版本是默认的
    id-generator: strong

官方配置文件

https://docs.camunda.org/manual/7.9/user-guide/spring-boot-integration/configuration/

最后

官方文档的更新有延迟吧,部分章节说需要配置,并提供了方案
其实有的在新版本里已经是默认了…

猜你喜欢

转载自blog.csdn.net/qq_39517116/article/details/123682698