WebSecurityConfigurerAdapter
和ResourceServerConfigurerAdapter
都定义了configure(HttpSecurity http)
方法。但是,他们似乎并没有以同样的方式运作。例如,当我使用WebSecurityConfigurerAdapter
时,我不必为AuthenticationProvider
定义UsernamePasswordAuthenticationToken
,这与我使用ResourceConfigurerAdapter
中的configure
不同。出于这个原因,我更喜欢在WebSecurityConfigurerAdapter
中使用springSecurityFilter
方法,但是,在我的设置中同时使用两个配置程序会导致一个异常,表明已经构建了一些bean(我认为它已经过了app.use(express.static('client'));
)。我该如何解决这个冲突?