๐—ฆ๐—ฒ๐—ฐ๐˜‚๐—ฟ๐—ถ๐˜๐˜† ๐—™๐—ถ๐—น๐˜๐—ฒ๐—ฟ ๐—–๐—ต๐—ฎ๐—ถ๐—ป ๐—˜๐˜…๐—ฝ๐—น๐—ฎ๐—ถ๐—ป๐—ฒ๐—ฑ

Every request in Spring Security passes through a filter chain.

It is a set of filters. These filters process requests before they reach your controller.

Think of it as a security checkpoint.

The filter chain helps you:

Here is how it works:

If a check fails, the request stops. The controller never sees it.

You configure this using a SecurityFilterChain bean.

You set rules for your endpoints.

Spring creates the filters for you.

The filter chain is the central part of Spring Security. It does not protect controllers. It protects the path to the controller.

The filter chain controls access to your application.

Source: https://dev.to/sonalishahi/security-filter-chain-explained-the-heart-of-spring-security-18hh