● Course · 16 chapters

The Complete Spring Boot Tutorial

Spring Boot removes the configuration, not the complexity. This course teaches you both: how to build a production REST service quickly, and what the framework is doing underneath — so that when something behaves strangely, you know exactly where to look.

Spring Boot 3.3 Spring Framework 6 Java 17+ Free · no sign-up
A Spring Boot REST controller, an application context wiring beans, and an embedded Tomcat server answering a request

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.

Four-stage roadmap: foundations, the container, building the app, production
Chapters 1–5 are the foundation. After that, jump to whatever you need.

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.
  • @Transactional silently 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

01

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.

02

Your first application

Generating a project, the anatomy of @SpringBootApplication, project layout, DevTools, and a working REST endpoint in ten minutes.

03

Beans and dependency injection

The container, stereotypes, constructor injection, scopes, the bean lifecycle, @Qualifier, @Primary and circular dependencies.

04

Auto-configuration and starters

How @EnableAutoConfiguration actually resolves, the conditional annotations, reading the condition report, and writing your own starter.

05

Configuration and profiles

Property source precedence, relaxed binding, @ConfigurationProperties, profiles, validation of config, and handling secrets.

06

Building REST APIs

The request lifecycle, mapping annotations, DTOs, ResponseEntity, status codes, content negotiation, pagination and calling other services.

07

Validation and error handling

Bean Validation, custom constraints, @RestControllerAdvice, RFC 9457 ProblemDetail responses, and an error contract that lasts.

08

Spring Data JPA

Entities, repositories, derived queries, JPQL, projections, paging, relationships, the N+1 problem, and when to reach for MyBatis instead.

09

Transactions

@Transactional internals, propagation, isolation, rollback rules, self-invocation, and the read-only optimisation.

10

Security

The filter chain, the modern lambda DSL, password hashing, JWT resource servers, method security, CORS and CSRF explained honestly.

11

Testing

Test slices, MockMvc, @MockitoBean, Testcontainers, context caching, and how to keep a big suite fast.

12

Actuator and observability

Health probes, Micrometer metrics, custom counters and timers, tracing, structured logging, and which endpoints must never be public.

13

AOP, events, async and caching

How proxies really work, writing an aspect, application events, @Async, @Scheduled and @Cacheable.

14

Packaging and deployment

Executable jars, layered Docker images, JVM settings in containers, graceful shutdown, health probes for Kubernetes, and native images.

15

Best practices and pitfalls

Package structure, layering rules, a performance checklist, security baseline, and the fifteen mistakes behind most Spring Boot incidents.

16

FAQ 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.

the domain
Author  1 ──── *  Book  * ──── 1  Publisher
                   │
                   * ──── 1  Category

AppUser (authentication)  ·  Review (write-heavy child of Book)
project layout used throughout
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/…
Package by feature, not by layer

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

ComponentVersionNote
Spring Boot3.3.xAnything 3.2+ behaves the same for this material
Spring Framework6.1.xJakarta EE namespace — jakarta.*, not javax.*
JDK17 (21 recommended)Records and virtual threads are used where they help
BuildMaven 3.9 / Gradle 8Both shown for the setup chapter
DatabasePostgreSQL 16, H2 for testsTestcontainers for the integration suite
Boot 2 → Boot 3 is not a drop-in upgrade

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.