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