【发布时间】:2019-08-10 17:30:37
【问题描述】:
我尝试在我的项目中使用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 的依赖。问题是我无法弄清楚在我的项目中调用该配置的位置。你知道如何找到它吗?
【问题讨论】:
-
你能在 pom.xml 中附加 spring 依赖项和你的主类吗?
-
我已经解决了这个问题。原来我只需要在
application.yml中指定spring.main.web-application-type。所以,我添加了这个spring.main.web-application-type: reactive
标签: java spring-boot spring-security spring-webflux