如果我在同一个securityConfig中有两个.authorizeHttpRequests,像这样:
@Configuration
@EnableWebSecurity
public class SecurityConfig {
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http
.csrf(Customizer.withDefaults())
.authorizeHttpRequests(authorize -> blahblahblah
)
.httpBasic(Customizer.withDefaults())
.formLogin(Customizer.withDefaults())
.authorizeHttpRequests(authorize -> blahblahblah
)
return http.build();
}
}
字符串
我的问题是,第二个.authorizeHttpRequest会取代第一个吗?
1条答案
按热度按时间qybjjes11#
第二个授权对象使用第一个授权对象。
下面的源代码广告
字符串