A curated, opinionated path from zero to production-grade Java and Spring Boot — refreshed for Java 25 (LTS) and Spring Boot 4 / Spring Framework 7.
Whether you're writing your first main method or hardening a microservice for production, this repo maps what to learn, in what order, with the best free resource for each step. Every link is hand-picked; the roadmap is kept current with the modern Java platform (records, sealed types, pattern matching, virtual threads) and the Spring Boot 3/4 generation.
flowchart TD
A["1 · Java Fundamentals"] --> B["2 · Object-Oriented Programming"]
B --> C["3 · Core APIs & Intermediate Java"]
C --> D["4 · Modern Java (14 → 25)"]
D --> E["5 · Advanced Java & the JVM"]
C --> F["6 · Testing"]
E --> G["7 · Clean Code, SOLID & Design Patterns"]
F --> G
C --> H["8 · Build Tools"]
G --> I["9 · Databases & Persistence"]
I --> J["10 · Jakarta EE & Servlets"]
J --> K["11 · Spring Framework & Spring Boot"]
H --> K
K --> L["12 · Cloud-Native, Microservices & Spring AI"]
K --> N["13 · Upgrading & Maintaining Legacy Code"]
L --> M["14 · Practice, Projects & Roadmaps"]
N --> M
- Follow the chapters in order if you're new — each builds on the last.
- Jump to a chapter if you're filling gaps (the roadmap above shows dependencies).
- Look for these markers on individual resources:
- 🎥 video · 📖 deep-read / official docs · ⚡ quick reference · 🧪 hands-on · ⭐ start here · 🆕 modern (Java 17+ / Spring Boot 3+)
- LTS-first mindset: target Java 21 or Java 25 and Spring Boot 4.x for anything new. Older material is still valuable for concepts — just prefer modern syntax when you code.
- Mind the version gap: many linked tutorials were written for Spring Boot 3 / Spring Security 6 / Jackson 2. The concepts carry over; where an API changed in Boot 4, the chapter calls it out.
AI coding assistants are part of the job now — but how you use them while learning decides whether you actually learn. In a 2026 randomized study by Anthropic, developers learning an unfamiliar library with AI help finished slightly faster but scored worse on understanding — except for those who used the assistant in ways that kept them thinking (asking for explanations, checking their own reasoning).
Use AI as a tutor and reviewer, not a ghostwriter:
- ✍️ Write it first, then ask. Attempt every exercise yourself; use AI afterwards to review, explain, or compare your solution with an idiomatic one.
- ❓ Ask "why", not "write". "Why does this
HashMaplookup returnnull?" teaches more than "fix my code". - 🔮 Predict before you run. When AI generates code, read it and predict its output or failure modes before executing it.
- 🧠 Get quizzed. "Quiz me on Chapter 3 — one question at a time, don't give the answer until I try."
- 🔍 Verify against the source. Models can be out of date (e.g. suggesting Spring Boot 2 /
javax.*code). Cross-check with the official docs linked in each chapter. - 🚫 Go unassisted on fundamentals. For Chapters 1–3, turn inline completion off. You can't review code you couldn't have written.
- Fundamentals of Java
- Object-Oriented Programming
- Core APIs & Intermediate Java
- Modern Java (14 → 25)
- Advanced Java & the JVM
- Testing
- Clean Code, SOLID & Design Patterns
- Build Tools
- Databases & Persistence
- Jakarta EE & Servlets
- Spring Framework & Spring Boot
- Cloud-Native, Microservices & Spring AI
- Upgrading & Maintaining Legacy Code
- Practice, Projects & Roadmaps
Goal: read, write, and run simple Java programs. Understand types, control flow, and errors.
⭐ Start here: dev.java — the official learning portal from Oracle · The Java Tutorials (Oracle)
Since Java 25, a beginner's first program no longer needs public class, static, or String[] args:
// Hello.java — run it directly with: java Hello.java
void main() {
String name = IO.readln("What's your name? ");
IO.println("Hello, " + name + "!");
}This is real, final Java (not a preview) — you add classes, public static void main, and packages later, once you need them. Older tutorials still show the classic form; both compile.
- Primitive Data Types in Java
- 📖 Primitive Data Types (Oracle Tutorial)
- 🆕
var— Local Variable Type Inference (Java 10+)
- Java Control Structures
- Convention: avoid
!inifconditions - The
switchStatement - 🆕 Switch Expressions (Java 14+) · see also Chapter 4
- String vs. StringBuilder vs. StringBuffer
- Guide to the Java String API
- 🆕 Text Blocks — multi-line strings (Java 15+)
- Exception Handling in Java
- Checked vs. Unchecked Exceptions
throwvs.throws- Creating a Custom Exception
Every job assumes these from day one — learn them alongside the language, not after.
- 📖 Debugging Code in IntelliJ IDEA (JetBrains)
- IntelliJ Debugging Tricks
- 🧪 Learn Git Branching — interactive tutorial
- 📖 Pro Git — the free official book
Goal: model problems with classes and objects; master the four pillars.
- Object-Oriented Programming in Java
- Concrete Classes
- 9 Rules About Constructors in Java
- Everything You Need to Know About Interfaces
- Abstract Class vs. Interface
- Access Modifiers Explained
- Access Modifiers with Examples
- What Is Inheritance
- 12 Rules & Examples About Inheritance
- Inheritance vs. Composition (prefer composition!)
- What Is Overloading
- 12 Rules of Overriding
- Overriding vs. Overloading
- Covariant Return Types
- Method Hiding
- Default & Private Methods in Interfaces
- Static & Default Methods in Interfaces
- The
thisKeyword - Type Casting
- The
staticKeyword - The
finalKeyword - Static Blocks
- Static Imports
- Pass-by-Value vs. Pass-by-Reference in Java
- Wrapper Classes & Autoboxing
- JavaBeans
- What Is a JavaBean, exactly? (StackOverflow)
- POJO Classes
- A Guide to Java Enums
- Overriding
toString() - The
equals()andhashCode()Contracts BigDecimalandBigInteger- Java Serialization
- Everything About Java Serialization
- Why implement
Serializable? (StackOverflow) - 🆕 Records — concise immutable data carriers (Java 14+)
Goal: fluently use the standard library — collections, generics, streams, and functional Java.
Fig: Collections Framework hierarchy. Source: javatpoint
List
- List Tutorial & Examples
- Sorting Lists
- Sorting a List by Multiple Attributes
- Convert an Iterator to a List
- Get a Random Element from a List
- Partition a List
- Remove All Nulls from a List
- Remove Duplicates from a List
- Check If Two Lists Are Equal
- Find an Element in a List
UnsupportedOperationExceptionon Lists- Copy a List to Another List
- Remove All Occurrences of a Value
- Add Multiple Items to an ArrayList
- Remove the First Element
- Ways to Iterate Over a List
- Intersection of Two Lists
- Count Duplicate Elements in an ArrayList
- Differences Between Two Lists
- Reversing a Linked List
- Assert Two Lists Equal Ignoring Order
Set
Map
- Guide to HashMap
- HashMap Under the Hood
- Guide to TreeMap
- TreeMap vs. HashMap
- Store Duplicate Keys in a Map
- Initialize a HashMap
- Merge Two Maps (Java 8)
- Sort a HashMap
- Compare Two HashMaps
- Using
Map.Entry - Working with Maps Using Streams
- Iterate Over a Map
Conversions & utilities
- Convert Between an Array and a List
- Convert Between an Array and a Set
- Convert Between a List and a Set
- Convert a Map to an Array, List or Set
- Convert a List to a Map
- Map to String Conversion
Arrays.asListvs.new ArrayList(Arrays.asList())- Collect Stream Elements into a List
stream().forEach()vs.forEach()- A Guide to the Java Iterator
- Time Complexity of Java Collections
- 🆕 Sequenced Collections (Java 21+)
- ⭐ Lambda Expressions Quick Start (Oracle)
- Functional Interfaces in Java
- Java Streams Explained (JRebel)
- A Comprehensive Guide to Java Streams
- Java Streams by Example (Capital One)
- A Guide to Java Collectors
- 🎥 Streams — video series (Java Brains)
- 🧪 Modern Java by Example (winterbe/java8-tutorial)
- 🆕 Stream Gatherers — custom intermediate ops (Java 24+)
- Java Reflection Tutorial (Jenkov)
- A Guide to Java Reflection
- 📖 Annotations (Oracle Tutorial)
- Common Java Annotations
- 🎥 Creating a Custom Annotation (video)
- Java Annotation Processing
- Annotations (winterbe)
@DeprecatedExamples@OverrideExamples@SuppressWarningsExamples- Annotation Processing Under the Hood
Goal: write idiomatic modern Java. These features define how professional code looks today — favour them over legacy patterns.
- 🆕 Records — immutable data classes
- 🆕 Sealed Classes & Interfaces — controlled hierarchies
- 🆕 Pattern Matching for
instanceof - 🆕 Pattern Matching for
switch - 🆕 Record Patterns — destructuring
- 🆕 Text Blocks — multi-line string literals
- 🆕 Switch Expressions
- 🆕
var— Local Variable Type Inference - 🆕 Sequenced Collections
- 🆕 Unnamed Variables & Patterns (
_) — Java 22 - 🆕 Stream Gatherers — custom intermediate operations — Java 24
Finalized in Java 25 (LTS) — the newest features you can use in production today:
- 🆕 Compact Source Files & Instance
main(JEP 512) —void main()with no class boilerplate; see 1.0 - 🆕 Module Import Declarations (JEP 511) —
import module java.base;pulls in a whole module's packages - 🆕 Flexible Constructor Bodies (JEP 513) — validate arguments before calling
super(...) - 🆕 Scoped Values (JEP 506) — safer, cheaper alternative to
ThreadLocal, built for virtual threads
⚠️ Still in preview in Java 25: Structured Concurrency (JEP 505). Great to learn, but it needs--enable-previewand its API may still change.
LTS releases (bold) are what you should target for production: Java 8, 11, 17, 21, 25.
- Java 8 — lambdas, streams,
Optional, new Date/Time - Java 9 — modules (JPMS),
varin the REPL, collection factory methods - Java 10 —
varlocal type inference - Java 11 — HTTP Client,
Stringmethods, run single-file source - Java 12 · Java 13 · Java 14 — switch expressions, records (preview), text blocks (preview)
- Java 15 — text blocks, sealed classes (preview)
- Java 16 — records & pattern matching for
instanceoffinalized - Java 17 — sealed classes finalized; migration guide 8 → 17
- Java 18 — UTF-8 by default, simple web server
- Java 21 — virtual threads, pattern matching for
switch, record patterns, sequenced collections - Java 22 — unnamed variables & patterns, Foreign Function & Memory API finalized, stream gatherers (preview)
- Java 23 · Java 24 — Markdown doc comments, stream gatherers finalized, virtual threads no longer pinned by
synchronized - Java 25 — 🆕 latest LTS: compact source files & instance
main, module imports, flexible constructor bodies, scoped values (all final); structured concurrency (still preview) · full JEP list - 📖 Full JDK release/JEP index (OpenJDK)
Goal: reason about concurrency and understand what happens beneath your code.
- Java Thread Programming — all 14 parts (foojay)
- The
synchronizedKeyword - The
volatileKeyword (Jenkov) CompletableFuture- 📖 Concurrency (Oracle Tutorial)
- Synchronization & Locks (MIT 6.005)
- ReentrantReadWriteLock
- ExecutorService (Jenkov)
- Thread Pools
- ThreadPoolExecutor Example
- Fork/Join Framework
- ⭐ Difference Between Thread and Virtual Thread
- OpenJDK Project Loom
- Structured Concurrency —
⚠️ still preview in Java 25 - Scoped Values (a modern alternative to
ThreadLocal) — final since Java 25 - Working with Virtual Threads in Spring
- JVM Garbage Collectors
- Experimental Garbage Collectors (ZGC, Shenandoah)
- Java Memory Management (interview-grade deep dive)
- Object Ordering:
Comparable&Comparator - Collections & Thread Safety
- 18 Collections & Generics Best Practices
extends/superWildcards & the Get-Put Principle- Generics, Subtyping & the Substitution Principle
- Static vs. Non-Static
- Upcasting & Downcasting
Goal: a habit, not a chore. Modern Java hiring assumes you can write clean, fast, isolated tests.
- ⭐ A Guide to JUnit 5
- Assertions in JUnit 4 and JUnit 5
- Assert an Exception Is Thrown
- Introduction to AssertJ — fluent assertions
- Mockito Series — basics to advanced
- Mockito with JUnit 5 (
@ExtendWith) - JUnit vs. Mockito — what each is for
- Docker Test Containers in Java Tests
- DB Integration Tests with Spring Boot & Testcontainers
- Built-in Testcontainers Support in Spring Boot (3.1+)
- 📖 Testcontainers — official site
- Testing in Spring Boot (see also Chapter 11.10)
Goal: write code other humans (and future-you) can change safely.
- ⭐ Refactoring Guru — Design Patterns (illustrated)
- Design Patterns Series (Baeldung)
- Design Principles & Patterns for Highly Concurrent Applications
- 📖 Refactoring Guru — Refactoring Catalog
Goal: build, test, and package projects reproducibly. Learn one deeply, know the other.
- Use the Maven/Gradle Wrapper — always commit
mvnw/gradlewso builds are reproducible.
Goal: move data in and out of a relational database, the Java way.
- Introduction to JDBC
- JPA Tutorial
- Learn JPA & Hibernate Series
- The DAO Pattern in Java
- Connection Pooling with HikariCP
- Database Migrations with Flyway
- Database Migrations with Liquibase — the other tool you'll meet in enterprise codebases
Spring's persistence layer (Spring Data JPA,
JdbcTemplate) is covered in Chapter 11.9.
Goal: understand the web foundation Spring MVC is built on. Note: the
javax.*namespace is nowjakarta.*(Jakarta EE 9+).
- 🎥 What Is Apache Tomcat?
- What Is a Servlet?
- Lifecycle of a Servlet
- How a Servlet Works
- ServletContext
- Servlet Filters
- What Is a WAR File?
- 🎥 Introduction to Servlets (video)
- Intro to Servlets (Baeldung)
- MVC with Servlets & JSP
Goal: build production REST services with Spring Boot 4 / Spring Framework 7. Target Boot 4.x for new work (Boot 3.5 reached end of open-source support on 30 June 2026).
⭐ Start here: Learn Spring Boot Series (Baeldung) · 📖 Spring Boot Reference Docs · 🧪 start.spring.io — bootstrap a project
- 📖 Spring Framework Overview (current reference)
- Why Choose Spring?
- 🆕 Spring Boot 3 & Spring Framework 6.0 — What's New
- 🆕 Spring Boot 4 & Spring Framework 7 — What's New
Most tutorials online still target Boot 3. These are the differences you'll notice first — each is covered in the section linked:
| Change | What it means for you | Where |
|---|---|---|
| Built-in API versioning | Version endpoints by path, header, query param or media type — no hand-rolled routing | 11.4 |
HTTP Interface clients & RestClient |
Declare a Java interface, get a typed HTTP client; RestTemplate is legacy |
11.4 |
@Retryable / @ConcurrencyLimit in core |
Basic resilience without pulling in Spring Retry or Resilience4j | 11.14 |
| JSpecify null-safety | @Nullable/@NonNull across the Spring APIs — your IDE and tools can catch NPEs at compile time |
11.2 |
| Jackson 3 | New tools.jackson packages; a Jackson 2 compatibility module eases migration |
11.8 |
| Spring Security 7 | Lambda DSL only; older WebSecurityConfigurerAdapter tutorials are obsolete |
11.11 |
| Modular auto-configuration | Boot's autoconfigure jar is split into focused modules — smaller apps, clearer dependencies | 13.2 |
| Baselines | Java 17+ (Java 25 recommended), Jakarta EE 11, Kotlin 2.2 | — |
- ⭐ 📖 Spring Boot 4.0 — release announcement
- Spring Boot 4: Everything You Need to Know (Dan Vega)
- Spring Framework 7 & Spring Boot 4 Deliver API Versioning, Resilience and Null-Safe Annotations (InfoQ)
- ⭐ Understanding the Core of the Spring Framework
- Spring Bean
- Inversion of Control & Dependency Injection
- What Is Dependency Injection?
@Autowired— Autowiring- Spring Bean Annotations
- Field vs. Constructor vs. Setter Injection (StackOverflow)
@Resource,@Inject&@Autowired@Componentvs.@Bean(StackOverflow)- Circular Dependencies in Spring
UnsatisfiedDependencyException- Bean Scopes
- 🆕 📖 Null-Safety with JSpecify (Spring Framework reference) · JSpecify user guide
- ⭐ Spring MVC Tutorial
- The DispatcherServlet
- How
@RequestMappingWorks (StackOverflow) - Spring vs. Spring Boot
- 🧪 Building an Application with Spring Boot (official guide)
@RequestMapping@RequestParam@Controllervs.@RestController- View Resolvers
- 🧪 Serving Web Content (official guide)
- 🎥 Spring Framework — video course (Java Brains)
- ⭐ REST with Spring Series
- Building a RESTful Web Service (Java config)
- 🧪 Building a RESTful Web Service (official guide)
- 🆕 📖 API Versioning (Spring Framework reference)
Calling other services (HTTP clients)
- 🆕 ⭐
RestClient— the modern synchronous HTTP client - 🆕 HTTP Interface clients (
@HttpExchange) - 📖 REST Clients (Spring Framework reference)
- Spring Profiles (JavaDevJournal)
- Spring Profiles (Baeldung)
- The
@ValueAnnotation - Type-safe
@ConfigurationProperties
🆕 Spring Boot 4 uses Jackson 3 (packages move from
com.fasterxml.jacksontotools.jackson, and mappers are immutable — configured viaJsonMapper.builder()). Concepts from Jackson 2 tutorials still apply.
- Jackson ObjectMapper Tutorial
- 📖 JSON support in Spring Boot (reference)
- Spring Template Engines (Thymeleaf, etc.)
- ⭐ Testing in Spring Boot
- See also the general Testing chapter (JUnit 5, Mockito, Testcontainers).
Spring Boot 4 ships Spring Security 7, which uses the lambda DSL exclusively and requires the
jakarta.*namespace. Tutorials usingWebSecurityConfigurerAdapteror.and()chaining are out of date — prefer the resources below.
- ⭐ Security with Spring Series
- Spring Boot Security Auto-Configuration
- 📖 Spring Security Reference Docs
OAuth 2.0 & OpenID Connect — how real-world APIs are secured (JWT tokens from Keycloak, Okta, Entra ID, etc.)
- ⭐ OAuth 2.0 Resource Server with Spring Security
- OAuth 2.0 Login (social / SSO login)
- 📖 OAuth2 (Spring Security reference)
- 🎥 Spring Security — video series (LinuxTex)
- Spring Boot Actuator
- Observability with Spring Boot (Micrometer, tracing)
- 📖 Observability (Spring Boot reference)
- 🆕 OpenTelemetry for Java — the vendor-neutral standard for traces, metrics and logs
- 📖 Logging in Spring Boot (incl. structured JSON logs)
- SLF4J with Logback & Log4j2
- Guide to Spring WebFlux
- Handling Errors in Spring WebFlux
- Reactor WebFlux vs. Virtual Threads — which to choose
New in Framework 7:
@Retryable(with backoff and jitter) and@ConcurrencyLimitlive in Spring core — enable them with@EnableResilientMethods. Reach for Resilience4j when you need circuit breakers or rate limiters.
- 🧪 Caching Data with Spring (official guide)
- A Guide to Caching in Spring
- Spring Boot Cache with Redis
Kafka and RabbitMQ show up in a large share of Java backend job descriptions. Learn the concepts (topics vs. queues, consumer groups, at-least-once delivery, idempotent consumers) — not just the annotations.
- ⭐ Intro to Apache Kafka with Spring
- 📖 Spring for Apache Kafka (reference)
- 🧪 Messaging with RabbitMQ (official guide)
- Messaging with Spring AMQP
Before reaching for microservices, structure one application into well-bounded modules. Spring Modulith verifies module boundaries in tests and lets modules talk via events.
- Docker Compose Support in Spring Boot — Boot starts your
compose.yamlservices and wires connection details automatically - 📖 Development-time Services (Spring Boot reference)
Goal: take a service beyond
localhost— package it, distribute it, observe it, and add AI.
- Dockerizing a Spring Boot Application
- 🧪 Spring Boot with Docker (official guide)
- 🧪 Spring Boot on Kubernetes (official guide)
- 🧪 Kubernetes Basics (official interactive tutorial)
Native images — millisecond startup, small memory footprint
- 📖 Building and Testing Java with Maven (GitHub Actions)
- Aim for a pipeline that runs tests (incl. Testcontainers), builds a container image, and deploys on merge.
Spring AI brings LLMs to Spring the way Spring Data brought databases: one portable API across providers (Anthropic, OpenAI, Bedrock, Ollama, …). Learn it in this order:
1. Talk to a model
- ⭐ Spring AI — project home
- 📖 Spring AI Reference — Getting Started
- 📖 The
ChatClientAPI - Introduction to Spring AI (Baeldung)
2. Let the model call your code (tool calling) — annotate existing service methods with @Tool
3. Ground answers in your own data (RAG)
- 📖 Retrieval-Augmented Generation
- 📖 Vector Databases · PGvector — vectors in plain PostgreSQL
- 📖 Advisors — memory, RAG and guardrails as interceptors
4. Test what the model returns — LLM output is non-deterministic; treat evaluation like testing
5. Expose your service to AI agents with MCP — the Model Context Protocol is the standard way for agents (Claude, IDE assistants, …) to call external tools
- ⭐ Getting Started with MCP (Spring AI)
- 📖 MCP Overview (Spring AI reference)
- Model Context Protocol with Spring AI (Baeldung)
ℹ️ Versions move fast here. Spring AI 1.1.x is the stable line and 2.0 is in release-candidate. For new remote MCP servers, prefer the Streamable HTTP transport over the older SSE transport — the protocol is moving toward stateless servers that scale behind load balancers. Always check the reference docs over blog posts.
Goal: be useful on day one of a real job. Most Java work happens in existing codebases on Java 8/11/17 and Spring Boot 2/3 — and with Boot 3.5's free support over, many teams are migrating to Boot 4 right now. Knowing how to upgrade safely is a genuine differentiator.
- Migrating from Java 8 to Java 17
- 📖 OpenRewrite — Java migration recipes — automated, reviewable code changes
- Strategy: upgrade the JDK first (keep the code compiling), then adopt new language features gradually.
javax→jakarta: the big Boot 3 break- Migrating to Spring Boot 3
- 📖 Spring Boot 4.0 Migration Guide (official wiki)
- 📖 OpenRewrite — Spring Boot 3 recipes · Spring Boot 4 recipes
- Strategy: get to the latest 3.5.x first and fix all deprecation warnings, then jump to 4.x. Never skip a major.
- 📖 Refactoring Guru — Refactoring Catalog — small, safe, named moves
- Write characterization tests that pin down current behaviour before you change anything (Chapter 6).
- Use the debugger (1.6) and
git log -p/git blameto learn why code is the way it is.
Goal: knowledge only sticks when you build. Pick a track and ship something.
- ⚡ dev.java — official Java resources & guides
- ⚡ Baeldung — full Java & Spring catalogue
- 📖 Official Java SE API Docs
- 📖 Spring Guides — task-focused tutorials
Progress from small to production-shaped — ideally by growing one app through every stage:
- CLI to-do app — Java 25
void main(), records, collections, file I/O, exception handling. - REST API for a bookstore — Spring Boot 4, Spring Data JPA, Flyway, validation,
ProblemDetailerrors, versioned endpoints, tests. - Secured multi-user API — Spring Security 7 as an OAuth2 resource server (e.g. Keycloak), profiles, Testcontainers integration tests.
- Event-driven & resilient — publish "order placed" events to Kafka, cache hot reads in Redis, call a downstream service with
RestClient+@Retryable. - Production-shaped — containerize, deploy to Kubernetes, add Actuator + OpenTelemetry, and a GitHub Actions pipeline.
- AI-powered features — a Spring AI endpoint that answers questions about your catalogue with RAG (pgvector), and expose the bookstore as an MCP server so an AI agent can search and order books.
- Upgrade challenge — clone an old open-source Spring Boot 2 sample and migrate it to Boot 4 with OpenRewrite.
Spotted a dead link, an out-of-date resource, or a missing modern topic? Contributions are very welcome:
- Open an issue describing the fix or the resource you'd add (with a short note on why it's good).
- Or submit a pull request — keep link descriptions concise, prefer up-to-date sources, and place the link in the right chapter.
Great additions: modern-Java resources, hands-on tutorials, and anything that replaces an outdated link with a current one.
Maintained for educational purposes. Curated for Java 25 (LTS) and Spring Boot 4 / Spring Framework 7. Last updated: October 25, 2026.
