Spring Boot Mastery · Java 21

Understand Spring before memorizing Spring Boot.

Start with object construction, the IoC container, lifecycle, and proxies. Then use that runtime model to understand Boot, MVC, JPA, security, testing, and production behavior.

Core lessons
84 lessons
Interactive labs
5 visualizers
Core study
44h study
Portfolio
5 systems
Interactive Runtime Simulation

Spring Boot Runtime Visualizers & Labs

Stop guessing from annotations. Step through the actual runtime machinery—bean post-processors, 3-level singleton caches, security filter chains, and declarative transaction boundaries.

5 Interactive Simulators
Interactive Heap & StepperCore IoC

Bean Lifecycle & Proxy Creation

Trace Spring bean initialization from BeanDefinition parsing to constructor invocation, Aware callbacks, BeanPostProcessor interceptors, and CGLIB dynamic proxy generation.

Runtime Mechanics

  • BeanDefinition registration & metadata inspection
  • BeanPostProcessor before & after initialization hooks
  • Dynamic CGLIB / JDK proxy wrapping on heap
  • DisposableBean destruction phase mechanics
Filter Pipeline SimulatorSecurity & Auth

SecurityFilterChain & Context Propagation

Trace HTTP requests traversing through SecurityContextHolderFilter, UsernamePasswordAuthenticationFilter, BearerTokenAuthenticationFilter, ExceptionTranslationFilter, and AuthorizationFilter.

Runtime Mechanics

  • Stateless ThreadLocal SecurityContextHolder lifecycle
  • AuthenticationManager & Provider authentication handshakes
  • ExceptionTranslationFilter 401 Unauthorized handling
  • Method security AOP advice inspection
Circular Reference SolverRuntime Internals

Three-Level Singleton Cache (L1, L2, L3)

Visualize how DefaultSingletonBeanRegistry uses singletonObjects (L1), earlySingletonObjects (L2), and singletonFactories (L3 ObjectFactory) to resolve circular references without stack overflow.

Runtime Mechanics

  • Level 1: singletonObjects (fully initialized beans)
  • Level 2: earlySingletonObjects (exposed raw/proxied references)
  • Level 3: singletonFactories (ObjectFactory lambdas)
  • SmartInstantiationAwareBeanPostProcessor early proxy hook
Front Controller FlowWeb MVC

DispatcherServlet & Web Request Lifecycle

Trace the complete HTTP request path: HandlerMapping resolution, HandlerAdapter execution, HandlerInterceptor preHandle/postHandle hooks, and HttpMessageConverter JSON serialization.

Runtime Mechanics

  • RequestMappingHandlerMapping lookup algorithm
  • HandlerAdapter bridging to target Controller method
  • HandlerInterceptor chain with preHandle and afterCompletion
  • Jackson HttpMessageConverter byte stream serialization
JDBC & JPA SyncData & Persistence

Declarative Transaction Boundary & AOP Proxies

Inspect how Spring creates dynamic AOP proxies around @Transactional methods, acquires JDBC connections, binds ThreadLocal TransactionSynchronization, and executes atomic rollback on unhandled RuntimeExceptions.

Runtime Mechanics

  • TransactionInterceptor proxy invocation boundary
  • TransactionSynchronizationManager ThreadLocal connection binding
  • Propagation behaviors (REQUIRED vs REQUIRES_NEW)
  • Automatic rollback triggers on unchecked RuntimeExceptions

Interview preparation

Explain the mechanism, then prove it.

Use module assessments after the retrieval questions, debugging exercises, and project checkpoints inside each stage.

Open interview practice

Reference

Keep primary sources close

Lessons explain the model; official documentation remains the versioned source of truth.