【问题标题】:Spring Boot requestDataValueProcessor Bean Definition ConflictSpring Boot requestDataValueProcessor Bean 定义冲突
【发布时间】: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


【解决方案1】:

运行 `mvn dependency:tree,您将能够看到项目的依赖树。然后试着找出哪些是这个依赖的包,去掉不需要的。

【讨论】:

    猜你喜欢
    • 2017-09-12
    • 1970-01-01
    • 2016-09-10
    • 1970-01-01
    • 2017-04-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-02-21
    相关资源
    最近更新 更多