beginnerSpring Security Architecture: The Filter Chain & Internal Flow

What replaced WebSecurityConfigurerAdapter in Spring Security 6?

WebSecurityConfigurerAdapter was deprecated in Spring Security 5.7 and fully removed in 6.x. It's replaced by defining one or more @Bean methods returning SecurityFilterChain, configured using the HttpSecurity lambda DSL. This component-based approach fits better with Spring Boot's auto-configuration model and allows multiple independent filter chains for different URL patterns.

Ready to master this question?

Generate a complete walkthrough — background, the full answer in plain language, a working code example explained line by line, a real-world scenario, common mistakes, and how this same question gets asked in different ways.

Sign in to generate a response

Next Step

Continue to What is the role of the AuthenticationManager, and how does ProviderManager fit in?← Back to all Spring Security questions