Who this course is for
You write Java and you have heard that Spring Boot is how modern JVM services get built.
Maybe you have already generated a project from start.spring.io, watched it
work, and been slightly unnerved by how much happened without you asking.
No Spring experience is assumed. We start from a plain main method and build up
to a secured, tested, observable, containerised service. Every "magic" moment gets
explained the chapter after it appears.
Why learn the internals at all?
Because Spring Boot's convenience is built entirely on conditional logic that runs at startup, and that logic is invisible until it does something you did not expect:
- Your bean is not injected, and there is no error — just a
null. @Transactionalsilently does nothing because of how the method was called.- Adding one dependency secures every endpoint in the application.
- A property works locally and is ignored in production.
- One list endpoint quietly issues 400 SQL queries.
Every one of those has a simple explanation and a one-line fix — if you know the mechanism. That is what this course is really teaching.
Syllabus
What is Spring Boot?
Spring vs Spring Boot, the problem it solves, inversion of control in plain terms, and a tour of the runtime architecture.
02Your first application
Generating a project, the anatomy of @SpringBootApplication, project
layout, DevTools, and a working REST endpoint in ten minutes.
Beans and dependency injection
The container, stereotypes, constructor injection, scopes, the bean lifecycle,
@Qualifier, @Primary and circular dependencies.
Auto-configuration and starters
How @EnableAutoConfiguration actually resolves, the conditional
annotations, reading the condition report, and writing your own starter.
Configuration and profiles
Property source precedence, relaxed binding, @ConfigurationProperties,
profiles, validation of config, and handling secrets.
Building REST APIs
The request lifecycle, mapping annotations, DTOs, ResponseEntity, status
codes, content negotiation, pagination and calling other services.
Validation and error handling
Bean Validation, custom constraints, @RestControllerAdvice,
RFC 9457 ProblemDetail responses, and an error contract that lasts.
Spring Data JPA
Entities, repositories, derived queries, JPQL, projections, paging, relationships, the N+1 problem, and when to reach for MyBatis instead.
09Transactions
@Transactional internals, propagation, isolation, rollback rules,
self-invocation, and the read-only optimisation.
Security
The filter chain, the modern lambda DSL, password hashing, JWT resource servers, method security, CORS and CSRF explained honestly.
11Testing
Test slices, MockMvc, @MockitoBean, Testcontainers,
context caching, and how to keep a big suite fast.
Actuator and observability
Health probes, Micrometer metrics, custom counters and timers, tracing, structured logging, and which endpoints must never be public.
13AOP, events, async and caching
How proxies really work, writing an aspect, application events,
@Async, @Scheduled and @Cacheable.
Packaging and deployment
Executable jars, layered Docker images, JVM settings in containers, graceful shutdown, health probes for Kubernetes, and native images.
15Best practices and pitfalls
Package structure, layering rules, a performance checklist, security baseline, and the fifteen mistakes behind most Spring Boot incidents.
16FAQ and interview questions
Fifty questions with direct answers, plus a one-page annotation cheat sheet.
The running example
Every chapter builds the same application: a small bookstore API. It is large enough to need real relationships, validation, security and paging, and small enough that you can hold all of it in your head.
Author 1 ──── * Book * ──── 1 Publisher
│
* ──── 1 Category
AppUser (authentication) · Review (write-heavy child of Book)
bookstore
├── pom.xml
└── src
├── main
│ ├── java/com/bitsnippets/bookstore
│ │ ├── BookstoreApplication.java
│ │ ├── catalog/ ← feature package, not a layer package
│ │ │ ├── Book.java entity
│ │ │ ├── BookRepository.java
│ │ │ ├── BookService.java
│ │ │ ├── BookController.java
│ │ │ └── dto/ BookRequest.java, BookResponse.java
│ │ ├── author/
│ │ ├── review/
│ │ ├── security/
│ │ └── common/ error handling, config, shared plumbing
│ └── resources
│ ├── application.yml
│ ├── application-dev.yml
│ └── db/migration/V1__init.sql
└── test/java/com/bitsnippets/bookstore/…
The layout above groups by domain concept (catalog,
author) rather than by technical role (controllers,
services, repositories). Changing one feature then touches one
folder, and package-private visibility can actually protect something.
Chapter 15 makes the full argument.
Versions this course targets
| Component | Version | Note |
|---|---|---|
| Spring Boot | 3.3.x | Anything 3.2+ behaves the same for this material |
| Spring Framework | 6.1.x | Jakarta EE namespace — jakarta.*, not javax.* |
| JDK | 17 (21 recommended) | Records and virtual threads are used where they help |
| Build | Maven 3.9 / Gradle 8 | Both shown for the setup chapter |
| Database | PostgreSQL 16, H2 for tests | Testcontainers for the integration suite |
Boot 3 requires Java 17 and moves from javax.* to jakarta.*.
If you are following an older tutorial alongside this one and hit
ClassNotFoundException: javax.servlet.Filter, that is why.