I started a spring boot 3.2 project, where I added the activiti-engine dependency
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-engine</artifactId>
</dependency>
And I see this error:
Could not autowire. No beans of 'RuntimeService' type found
When I try to inject the RuntimeService in order to call the startProcessInstanceById method.
I saw many questions similar to mine, but still I couldn't figure out the best alternative or solution.
Any suggestions?
This error typically arises when Spring Boot cannot locate a bean of
RuntimeServicetype to inject into the dependent class.So first ensure that
RuntimeServicebean is properly configured and available for injection.Then:
RuntimeServicebean in your Spring configuration class using@Beanannotation.@Serviceannotation to theRuntimeServiceclass to make it a Spring-managed bean.