我用的activiti版本是5.22
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring-boot-starter-basic</artifactId>
<version>5.22.0</version>
</dependency>
启动报错:
nested exception is java.io.FileNotFoundException: class path resource [org/springframework/security/config/annotation/authentication/configurers/GlobalAuthenticationConfigurerAdapter.class] cannot be opened because it does not exist
原因:
SpringBoot 2.0的start中默认有一个"spring-boot-autoconfigure-2.0..RELEASE.jar",如果你还引用了activiti的"activiti-spring-boot-starter-rest-api.jar"包,需要将两个包中的 SecurityAutoConfiguration.class 都排除。
解决方法:
@SpringBootApplication注解后面改成这样
@SpringBootApplication(exclude={
org.activiti.spring.boot.SecurityAutoConfiguration.class,
SecurityAutoConfiguration.class
})