7

I try to use SpringWebFluxSecurityin my project, but I got this error when compiling

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.

I know that I have to remove the dependency to WebMvcSecurityConfiguration. The problem is I cannot figure out where that configuration is being called in my project. Do you have any idea how to find it?

Rafi Ramadhan
  • 119
  • 1
  • 11
  • Could you attach pom.xml with spring dependencies and your main class? – Alexander Terekhov Mar 20 '19 at 09:15
  • 5
    I already solved this problem. It turns out that I just need to specify spring.main.web-application-type inside `application.yml`. So, I add this `spring.main.web-application-type: reactive` – Rafi Ramadhan Apr 02 '19 at 04:16

1 Answers1

2

Run a `mvn dependence:tree and you'll be able to see the dependence tree of your project. Then try to find out which are the packages of this dependencies and removes that you don't need.

Pablo Castro
  • 134
  • 6