2

WebSecurityConfigurerAdapter定义ResourceServerConfigurerAdapter方法configure(HttpSecurity http)。但是,它们的运作方式似乎不同。例如,当我使用 时WebSecurityConfigurerAdapter,我不必定义AuthenticationProviderfor UsernamePasswordAuthenticationToken,这与我使用 in 时不同ResourceConfigurerAdapter。出于这个原因,我更喜欢使用 in 中的configure方法WebSecurityConfigurerAdapter,但是,在我的设置中同时使用两个配置器会导致异常,指出已经构建了一些 bean(我认为是springSecurityFilter)。我该如何解决这个冲突?

4

0 回答 0