[Spring Boot] Spring Security - SecurityContextHolder

brandon·2025년 5월 26일

spring-boot

목록 보기
4/15

What is it?

SecurityContextHolder is a core utility class provided by Spring Security that holds the security context of the currently authenticated user for the current thread.

Key Concept

  1. Thread-local storage

SecurityContextHolder uses ThreadLocal by default.

This means each thread handling a request has its own security context, so multiple users accessing your server don't interfere with each other.

profile
everything happens for a reason

0개의 댓글