Spring · Foundation

The Spring Ecosystem Map

Spring Boot is a container, a request pipeline and a set of auto-wired defaults. Once you can see how those three fit together, every annotation stops being magic. This page is the map; the 14 pages after it are the territory.

15
Deep Dives
4
Parts
3.x
Boot Version
01
Section One · Foundation

What Spring Actually Is

Spring Framework is, at its heart, one idea: an object-wiring container. You describe your objects (beans) and what each one needs; the container builds them, connects them, and manages their lifecycle. Everything else in Spring — MVC, Data, Security, Transactions, Caching — is built by adding behaviour to beans, mostly by wrapping them in proxies.

Spring Boot removes the assembly work. It reads your classpath, decides which framework features you probably want, registers the beans to make them work, and packages it all with an embedded web server. "Opinionated" means a sensible default for every choice, and a clean way to override each one.

🧩

Container

The ApplicationContext creates and wires beans. Dependency injection means your classes never call new on their collaborators.

🪄

Auto-configuration

Boot checks the classpath and existing beans with @Conditional rules, and registers defaults only where you haven't.

📦

Embedded runtime

Tomcat (or Jetty/Undertow) lives inside your JAR. java -jar app.jar is the whole deployment.

Analogy: Spring Framework is a fully equipped professional kitchen: every appliance is there, but you wire the gas and water yourself. Spring Boot is the same kitchen delivered pre-installed, with a menu of defaults. If you want a different oven, you swap it, and the rest keeps working.
Common misconception: "Spring Boot is a different framework." It isn't: a Boot app is a Spring app with an auto-configuration layer and a launcher on top. When Boot "magic" confuses you, the answer is always in the plain Spring container underneath, which is why pages 01–03 come first.
02
Section Two · Architecture

Three Layers, One Container

Think of a running Boot application as three stacked layers. Your code sits on top and rarely touches the lower two directly, but every bug eventually traces to one of them.

Layered view of a Spring Boot application
YOUR CODE @RestController @Service @Repository @Entity @Configuration SPRING BOOT — the assembly layer Starters curated dependencies one line in pom.xml Auto-configuration @Conditional* rules backs off if you declare Externalized config yaml · env · args profiles Embedded server Tomcat in the JAR + Actuator SPRING FRAMEWORK — the container and its modules Core / IoC beans · DI events · SpEL AOP proxies advice Web MVC DispatcherServlet converters Data / Tx repositories @Transactional Security · Cache · Test filter chain · abstractions test slices
ConceptOne-line definitionDeep dive
BeanAny object whose creation and lifecycle the container manages01 · IoC & DI
ApplicationContextThe container: bean definitions, wiring, events, environment01 · IoC & DI
Scope / lifecycleHow many instances exist, and what happens at birth and death02 · Beans
ProxyA stand-in object that adds behaviour (transactions, caching, security) around yours03 · AOP
Auto-configurationConditional bean registration based on classpath, properties and existing beans04 · Boot internals
Environment / profileProperty sources plus named configuration sets11 · Configuration
03
Section Three · Runtime

The Journey of One HTTP Request

One request crosses most of the framework. If you can narrate this path, you can place any bug: a 401 is in the security filters, a 400 is in binding or validation, a 500 with a lazy-loading exception is in the persistence context, and so on. Each numbered step below is a page of this guide.

POST /orders — from socket to database and back
Client JSON + Bearer Tomcat thread per request ① SECURITY FILTER CHAIN authn · CORS · CSRF ② DispatcherServlet handler mapping ③ BINDING Jackson → DTO ④ VALIDATION @Valid → 400 ⑤ CONTROLLER OrderController.create ⑥ PROXY (AOP) @Transactional begin ⑦ SERVICE (your code) OrderService.place(dto) ⑧ SPRING DATA / HIBERNATE persistence context · flush Database Hikari connection pool The return trip proxy commits or rolls back exception → rollback @ControllerAdvice exception → ProblemDetail message converter object → JSON, status line Client 201 Created Where bugs live: 401/403 → ① 404/405/415 → ② 400 malformed JSON → ③ 400 field errors → ④ "proxy didn't fire" → ⑥ LazyInitializationException / N+1 → ⑧ pool timeout → database Pages: ①→09/10 · ②③→05 · ④→06 · ⑥→03/08 · ⑧→07
Why this matters: every symptom has an address. When something fails, name the step first, then read the matching page. That's faster than searching the exception text.
04
Section Four · Startup

What Happens Before the First Request

Before any request, SpringApplication.run() builds the container. Knowing the order explains most startup failures such as NoSuchBeanDefinitionException, circular dependencies, and "my property wasn't picked up".

SpringApplication.run() — the startup sequence
1 · ENVIRONMENT load yaml, env, args; pick profiles 2 · CONTEXT create the empty ApplicationContext 3 · SCAN @ComponentScan → bean definitions 4 · AUTO-CONFIG evaluate @Conditional add default beans 5 · INSTANTIATE create singletons, inject, wrap in proxies 6 · START Tomcat, runners Failure signatures by stage ① ConfigDataLocationNotFoundException · invalid profile ③④ missing bean because it's outside the scan package, or a @Conditional didn't match (run with --debug) ⑤ UnsatisfiedDependencyException · BeanCurrentlyInCreationException (circular) · NoUniqueBeanDefinitionException ⑥ WebServerException: port already in use · failing CommandLineRunner aborts startup Deep dives: 01 IoC · 02 Beans · 04 Boot internals · 11 Configuration
05
Section Five · Landscape

The Wider Ecosystem

Inner ring · used in almost every service
Spring Core & Context

IoC container, dependency injection, events, environment abstraction.

Spring MVC

REST controllers, request mapping, message converters, exception handling.

Spring Data JPA

Repository abstraction on top of Hibernate; derived queries; paging.

Spring Security

Servlet filter chain, authentication, method security, OAuth2 resource server.

Outer ring · situational
Spring Cloud

Config server, gateway, service discovery, load balancing.

Spring Batch

Chunked, restartable bulk jobs with reader/processor/writer steps.

Spring for Kafka / AMQP

Listener containers, templates, retry and dead-letter handling.

Spring WebFlux

Reactive, non-blocking stack on Reactor/Netty. Different model, not "faster MVC".

Spring Integration

Enterprise integration patterns: channels, routers, transformers.

Spring AI & Modulith

LLM client abstractions; module boundaries enforced inside a monolith.

Rule of thumb: Core + MVC + Data JPA + Security covers most backend services. Add the outer ring only when you can name the problem it solves, not because it's in the starter list.
06
Section Six · The Unifying Idea

Proxies Everywhere

Many "magic" annotations are not special language features. They're a proxy around your bean that runs extra code before and after your method. This is the single most useful idea for debugging Spring.

What the caller actually receives
Controller calls service PROXY — generated at startup security check begin tx cache lookup YOUR OrderService.place() the real, plain Java object commit / rollback cache put · metrics · retry @PreAuthorize @Transactional @Cacheable @Async · @Retryable @Timed · @Validated → all are proxy-based
The classic trap: a method calling another method on this bypasses the proxy, so @Transactional, @Cacheable or @Async on the callee silently does nothing. You'll meet this in 03 · AOP and 08 · Transactions, and it is the most-asked Spring interview question.
07
Section Seven · Dependencies

Starter Cheatsheet

A starter carries no code of its own. It's a curated dependency set, whose versions are aligned by Boot's BOM. Adding one both pulls in the libraries and flips on the matching auto-configuration.

StarterBrings inPage
spring-boot-starter-webSpring MVC, Jackson, embedded Tomcat05
spring-boot-starter-validationJakarta Bean Validation + Hibernate Validator06
spring-boot-starter-data-jpaHibernate, Spring Data JPA, HikariCP, transaction support07
spring-boot-starter-securitySpring Security filter chain and defaults09
spring-boot-starter-oauth2-resource-serverJWT/opaque token validation10
spring-boot-starter-actuatorHealth, metrics, info endpoints; Micrometer12
spring-boot-starter-cache@Cacheable abstraction (pair with Caffeine or Redis)13
spring-boot-starter-testJUnit 5, Mockito, AssertJ, MockMvc, JSONPath14
08
Section Eight · Learning Path

How to Work Through This Guide

The four parts build on each other: the container first, then the web and data layers that run on it, then security, then everything that makes a service production-grade. If you're short on time, read 01 → 03 → 04 first; they unlock all the rest.

Part 1 · The container
Part 2 · Web and data
Part 3 · Security
Part 4 · Production-grade
Preparing for interviews? After pages 01–04 and 07–08, go to 15 · Interview Q&A: 70+ questions with model answers and the follow-up trap behind each.