我已经从activiti boot starter中排除了spring安全性。但它仍在引用Spring安全类。
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring-boot-starter</artifactId>
<version>7.1.0.M4</version>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</exclusion>
</exclusions>
</dependency>
排除Spring安全依赖项后,我遇到错误。
org.springframework.beans.factory.BeanDefinitionStoreException:失败 处理配置类的导入候选 [com.infy.activitidrools.ActivitiDroolsApplication];嵌套异常 是java.io.FileNotFoundException:类路径资源 [org / springframework / security / config / annotation / method / configuration / GlobalMethodSecurityConfiguration.class] 无法打开,因为它不存在 在org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:596) 〜[spring-context-5.1.10.RELEASE.jar:5.1.10.RELEASE] 在org.springframework.context.annotation.ConfigurationClassParser.access $ 900(ConfigurationClassParser.java:108) 〜[spring-context-5.1.10.RELEASE.jar:5.1.10.RELEASE] 在org.springframework.context.annotation.ConfigurationClassParser $ DeferredImportSelectorGroupingHandler.lambda $ processGroupImports $ 1(ConfigurationClassParser.java:805)处 〜[spring-context-5.1.10.RELEASE.jar:5.1.10.RELEASE] 在java.base / java.util.ArrayList.forEach(ArrayList.java:1540)〜[na:na] 在org.springframework.context.annotation.ConfigurationClassParser $ DeferredImportSelectorGroupingHandler.processGroupImports(ConfigurationClassParser.java:801) 〜[spring-context-5.1.10.RELEASE.jar:5.1.10.RELEASE] 在org.springframework.context.annotation.ConfigurationClassParser $ DeferredImportSelectorHandler.process(ConfigurationClassParser.java:771) 〜[spring-context-5.1.10.RELEASE.jar:5.1.10.RELEASE] 在org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:185) 〜[spring-context-5.1.10.RELEASE.jar:5.1.10.RELEASE] 在org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:315)处 〜[spring-context-5.1.10.RELEASE.jar:5.1.10.RELEASE] 在org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:232)处 〜[spring-context-5.1.10.RELEASE.jar:5.1.10.RELEASE] 在org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275) 〜[spring-context-5.1.10.RELEASE.jar:5.1.10.RELEASE] 在org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95) 〜[spring-context-5.1.10.RELEASE.jar:5.1.10.RELEASE] 在org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:705) 〜[spring-context-5.1.10.RELEASE.jar:5.1.10.RELEASE] 在org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:531) 〜[spring-context-5.1.10.RELEASE.jar:5.1.10.RELEASE] 在org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) 〜[spring-boot-2.1.9.RELEASE.jar:2.1.9.RELEASE] 在org.springframework.boot.SpringApplication.refresh(SpringApplication.java:744) 〜[spring-boot-2.1.9.RELEASE.jar:2.1.9.RELEASE] 在org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:391) 〜[spring-boot-2.1.9.RELEASE.jar:2.1.9.RELEASE] 在org.springframework.boot.SpringApplication.run(SpringApplication.java:312) 〜[spring-boot-2.1.9.RELEASE.jar:2.1.9.RELEASE] 在org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) 〜[spring-boot-2.1.9.RELEASE.jar:2.1.9.RELEASE] 在org.springframework.boot.SpringApplication.run(SpringApplication.java:1204) 〜[spring-boot-2.1.9.RELEASE.jar:2.1.9.RELEASE] 在com.infy.activitidrools.ActivitiDroolsApplication.main(ActivitiDroolsApplication.java:10) 〜[classes /:na]