Member-only story

Spring Security 6 — Multiple SecurityFilterChain instances

Eric Anicet
6 min readJan 13, 2025

--

In this story, we’ll learn how to implement multiple security filter chains in a Spring Boot application using Spring Security.

· Prerequisites
· Overview
A Review of Filters
Architecture core components
Multiple SecurityFilterChain
· Project Setup
Configuring Spring Security
Usage in Controllers
· Test the application
· Conclusion
· References

Prerequisites

This is the list of all the prerequisites:

  • Spring Boot 3+
  • Maven 3.6.3
  • Java 21
  • Postman / insomnia or any other API testing tool.

Overview

A Review of Filters

Spring security is based on Servlet Filters, which perform filtering tasks on either the request to a resource (a servlet or static content), the response from a resource, or both.

--

--

No responses yet