首页 > 解决方案 > 无法注册在类路径资源 [org/activiti/spring/boot/MethodSecurityConfig.class] 中定义的 bean 'methodSecurityInterceptor'

问题描述

***************************
APPLICATION FAILED TO START
***************************

Description:

The bean 'methodSecurityInterceptor', defined in class path resource [org/activiti/spring/boot/MethodSecurityConfig.class], could not be registered. A bean with that name has already been defined in class path resource [org/springframework/security/config/annotation/method/configuration/GlobalMethodSecurityConfiguration.class] and overriding is disabled.

Action:

Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true

我使用 SpringBoot 2.2.12 和 SpringSecurity 5.2.8 和 activiti 7.1.0.M4 然后得到错误。

我认为这可能是由与 SpringSecurity 的 activiti 冲突引起的。

标签: springspring-bootspring-securityactiviti

解决方案


我认为。如果两个框架bean命名定义有冲突,可以尝试自定义其中一个


推荐阅读