Spring Boot requestDataValueProcessor Bean定义冲突

时间:2019-03-20 04:40:23

标签: java spring-boot spring-security spring-webflux

我尝试在项目中使用SpringWebFluxSecurity,但是在编译时出现此错误

The bean 'requestDataValueProcessor', defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebMvcSecurityConfiguration.class], could not be registered. A bean with that name has already been defined in class path resource [org/springframework/security/config/annotation/web/reactive/WebFluxSecurityConfiguration.class] and overriding is disabled.

我知道我必须删除对WebMvcSecurityConfiguration的依赖。问题是我无法弄清楚在我的项目中该配置在哪里被调用。你有什么想法吗?

1 个答案:

答案 0 :(得分:0)

运行`mvndependency:tree,您将能够看到项目的依赖树。然后尝试找出这些依赖项的包,并删除不需要的包。