- 在 pom.xml里引入以下依赖
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring-boot-starter-basic</artifactId>
<version>6.0.0</version>
</dependency>
如果项目里引入了mapper,则需要再mapper依赖中排除persistence-api,否则会以下的错误:
Consider defining a bean of type 'javax.persistence.EntityManagerFactory' in your configuration.
2.在配置文件中,设置
spring:
activiti:
check-process-definitions: false
如果不设置,则会报错
java.io.FileNotFoundException: class path resource [processes/] cannot be resolved to URL because it does not exist
另外在resources目录下添加processes文件夹,并且在该目录下放bpmn文件或者bpmn20.xml文件,启动也不会报上述错误。