Skip to main content

SecurityFilterChain: Securing URLs

Learn SecurityFilterChain: Securing URLs (Spring Security, Spring Boot) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

What a SecurityFilterChain Is Spring Security is a list of servlet filters that run before your controller. A SecurityFilterChain bean is how you configure that list: which URLs are public, which need a login, which need a role, how a user logs in, and what to do about sessions and CSRF. Since Spring Security 6 (Spring Boot 3) you declare it as a @Bean . The old WebSecurityConfigurerAdapter no longer exists.

More lessons in Spring Security