springboot2.0.6.RELEASE集成activit
2018-11-09 本文已影响0人
爱的旋转体
- 错误:
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [com.mycompany.myapp.SecondApp]; 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
解决:springboot2.0.6的start中默认有一个spring-boot-autoconfigure-2.0..RELEASE.jar中有一个SecurityAutoConfiguration.class ,activity6.0.0中activiti-spring-boot-starter-rest-api.jar包也有一个SecurityAutoConfiguration.class,需要将两个包中的 SecurityAutoConfiguration.class 都排除。
@SpringBootApplication(exclude={
org.activiti.spring.boot.SecurityAutoConfiguration.class,
SecurityAutoConfiguration.class
})
2.错误:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springProcessEngineConfiguration' defined in class path resource [org/activiti/spring/boot/JpaProcessEngineAutoConfiguration$JpaConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.activiti.spring.SpringProcessEngineConfiguration]: Factory method 'springProcessEngineConfiguration' threw exception; nested exception is java.io.FileNotFoundException: class path resource [processes/] cannot be resolved to URL because it does not exist
解决:activity默认校验resources下的processes文件夹里的流程文件,可以手动创建processes文件夹并放入设计好的流程文件或者在配置文件中配置不校验:
spring.activiti.check-process-definitions=false