В соответствии с Spring Security в Customizer withDefaults() указывает:
Возвращает Customizer, который не изменяет входной аргумент .
Но что именно это означает?
Например. каков будет результат, если я буду использовать его вот так:
@EnableWebSecurity
@Configuration
public class SecurityConfiguration {
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http.csrf().disable()
.authorizeHttpRequests((authz) -> authz.anyRequest().authenticated())
.httpBasic(withDefaults());
return http.build();
}
}
Подробнее здесь: https://stackoverflow.com/questions/735 ... g-security