springboot3.x整合activiti7时报错,报错如下:springboot3.x整合activiti7启动时,报错:Unsatisfied dependency expressed through field 'processRuntime': No qualifying bean of type 'org.activiti.api.process.runtime.ProcessRuntime' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
版本信息:
java:17
activiti:7.0.0Beta2
springboot:3.2.5
security 配置文件如下:
测试模块代码如下:
activiti依赖如下:
运行测试模块,报错如下:
原因:
网上查了一下,说是 springboot3.x 和 activiti7 及之前的版本都不兼容;跑去 github 上面看了一下,也有人提出类似问题,但是作者并没有进行回复。
解决办法:
1、降低 springboot 版本,我尝试把 springboot 版本降低到 2.7.6,就能正常运行;
2、提升 activiti 到 8.0 以上版本,如果使用 8.2 及以上版本,需要使用 jdk21。