Skip to content

About

A beginner friendly material to start with. These resources can be used as training material for freshers.

Resources

Stars

169 stars

Watchers

4 watching

Forks

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

☕ Java & Spring — The Modern Learning Roadmap

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.

Java 25 LTS Spring Boot 4 Spring Framework 7 Jakarta EE PRs welcome License

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.


🗺️ The Roadmap at a Glance

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
Loading

🧭 How to Use This Guide

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

🤖 Learning with AI Assistants

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 HashMap lookup return null?" 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.

📚 Table of Contents

  1. Fundamentals of Java
  2. Object-Oriented Programming
  3. Core APIs & Intermediate Java
  4. Modern Java (14 → 25)
  5. Advanced Java & the JVM
  6. Testing
  7. Clean Code, SOLID & Design Patterns
  8. Build Tools
  9. Databases & Persistence
  10. Jakarta EE & Servlets
  11. Spring Framework & Spring Boot
  12. Cloud-Native, Microservices & Spring AI
  13. Upgrading & Maintaining Legacy Code
  14. Practice, Projects & Roadmaps

🌱 Chapter 1: Fundamentals of Java

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)

1.0 Your First Program — the Java 25 Way 🆕

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.

1.1 Primitives & Variables

1.2 Operators & Conditionals

1.3 Loops

1.4 Strings

1.5 Exception Handling

1.6 Tools of the Trade: IDE, Debugger & Git

Every job assumes these from day one — learn them alongside the language, not after.


🧱 Chapter 2: Object-Oriented Programming

Goal: model problems with classes and objects; master the four pillars.

2.1 Classes, Interfaces, Abstract Classes & Access Modifiers

2.2 Encapsulation

2.3 Abstraction

2.4 Inheritance

2.5 Polymorphism

2.6 Overloading & Overriding

2.7 Keywords, Members & Data Objects


🔧 Chapter 3: Core APIs & Intermediate Java

Goal: fluently use the standard library — collections, generics, streams, and functional Java.

3.1 Collections Framework

Java Collections Framework hierarchy

Fig: Collections Framework hierarchy. Source: javatpoint

List

Set

Map

Conversions & utilities

3.2 Generics

3.3 Lambdas, Functional Interfaces & Streams

3.4 Optional

3.5 Annotations & Reflection

3.6 Date & Time API

3.7 Command-Line Tools


🚀 Chapter 4: Modern Java (14 → 25)

Goal: write idiomatic modern Java. These features define how professional code looks today — favour them over legacy patterns.

4.1 Language Features Every Modern Java Dev Should Know

Finalized in Java 25 (LTS) — the newest features you can use in production today:

⚠️ Still in preview in Java 25: Structured Concurrency (JEP 505). Great to learn, but it needs --enable-preview and its API may still change.

4.2 What's New, Version by Version

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), var in the REPL, collection factory methods
  • Java 10 — var local type inference
  • Java 11 — HTTP Client, String methods, 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 instanceof finalized
  • 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)

⚙️ Chapter 5: Advanced Java & the JVM

Goal: reason about concurrency and understand what happens beneath your code.

5.1 Concurrency — Classic

5.2 Concurrency — Modern (Project Loom) 🆕

5.3 The JVM: Memory & Garbage Collection

5.4 Miscellaneous Deep Cuts


🧪 Chapter 6: Testing

Goal: a habit, not a chore. Modern Java hiring assumes you can write clean, fast, isolated tests.

6.1 Unit Testing

6.2 Mocking

6.3 Integration Testing with Testcontainers 🆕

6.4 Testing Spring Applications


✨ Chapter 7: Clean Code, SOLID & Design Patterns

Goal: write code other humans (and future-you) can change safely.

7.1 Clean Code

7.2 SOLID Principles

7.3 Design Patterns


🛠️ Chapter 8: Build Tools

Goal: build, test, and package projects reproducibly. Learn one deeply, know the other.

8.1 Maven

8.2 Gradle

8.3 The Wrapper


🗄️ Chapter 9: Databases & Persistence

Goal: move data in and out of a relational database, the Java way.

Spring's persistence layer (Spring Data JPA, JdbcTemplate) is covered in Chapter 11.9.


🌐 Chapter 10: Jakarta EE & Servlets

Goal: understand the web foundation Spring MVC is built on. Note: the javax.* namespace is now jakarta.* (Jakarta EE 9+).


🍃 Chapter 11: Spring Framework & Spring Boot

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

11.1 Overview of the Spring Framework

🆕 What changed in Spring Boot 4 / Framework 7 (Nov 2025)

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 —

11.2 Beans, Inversion of Control & Dependency Injection

11.3 Spring MVC & Spring Boot

11.4 Building REST APIs

Calling other services (HTTP clients)

11.5 Validation

11.6 Exception Handling

11.7 Configuration, Properties & Profiles

11.8 JSON, Templates & Serialization

🆕 Spring Boot 4 uses Jackson 3 (packages move from com.fasterxml.jackson to tools.jackson, and mappers are immutable — configured via JsonMapper.builder()). Concepts from Jackson 2 tutorials still apply.

11.9 Persistence: Spring JDBC & Spring Data JPA

11.10 Testing Spring Applications

11.11 Spring Security 🆕

Spring Boot 4 ships Spring Security 7, which uses the lambda DSL exclusively and requires the jakarta.* namespace. Tutorials using WebSecurityConfigurerAdapter or .and() chaining are out of date — prefer the resources below.

OAuth 2.0 & OpenID Connect — how real-world APIs are secured (JWT tokens from Keycloak, Okta, Entra ID, etc.)

11.12 Actuator & Observability 🆕

11.13 Reactive Spring (WebFlux) 🆕

11.14 Resilience: Retries & Concurrency Limits 🆕

New in Framework 7: @Retryable (with backoff and jitter) and @ConcurrencyLimit live in Spring core — enable them with @EnableResilientMethods. Reach for Resilience4j when you need circuit breakers or rate limiters.

11.15 Caching

11.16 Messaging & Event-Driven Systems

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.

11.17 Modular Monoliths with Spring Modulith 🆕

Before reaching for microservices, structure one application into well-bounded modules. Spring Modulith verifies module boundaries in tests and lets modules talk via events.

11.18 Local Dev: Docker Compose & Testcontainers at Dev Time 🆕


☁️ Chapter 12: Cloud-Native, Microservices & Spring AI

Goal: take a service beyond localhost — package it, distribute it, observe it, and add AI.

12.1 Microservices with Spring Cloud

12.2 Containerization

Native images — millisecond startup, small memory footprint

12.3 CI/CD

12.4 Spring AI 🆕

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

2. Let the model call your code (tool calling) — annotate existing service methods with @Tool

3. Ground answers in your own data (RAG)

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

ℹ️ 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.


🔄 Chapter 13: Upgrading & Maintaining Legacy Code

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.

13.1 Upgrading Java (8 → 17 → 21 → 25)

13.2 Upgrading Spring Boot (2 → 3 → 4)

13.3 Working in Code You Didn't Write

  • 📖 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 blame to learn why code is the way it is.

🎯 Chapter 14: Practice, Projects & Roadmaps

Goal: knowledge only sticks when you build. Pick a track and ship something.

14.1 Visual Roadmaps

14.2 Coding Practice

14.3 Reference & Cheat Sheets

14.4 Project Ideas to Build

Progress from small to production-shaped — ideally by growing one app through every stage:

  1. CLI to-do app — Java 25 void main(), records, collections, file I/O, exception handling.
  2. REST API for a bookstore — Spring Boot 4, Spring Data JPA, Flyway, validation, ProblemDetail errors, versioned endpoints, tests.
  3. Secured multi-user API — Spring Security 7 as an OAuth2 resource server (e.g. Keycloak), profiles, Testcontainers integration tests.
  4. Event-driven & resilient — publish "order placed" events to Kafka, cache hot reads in Redis, call a downstream service with RestClient + @Retryable.
  5. Production-shaped — containerize, deploy to Kubernetes, add Actuator + OpenTelemetry, and a GitHub Actions pipeline.
  6. 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.
  7. Upgrade challenge — clone an old open-source Spring Boot 2 sample and migrate it to Boot 4 with OpenRewrite.

🤝 Contributing

Spotted a dead link, an out-of-date resource, or a missing modern topic? Contributions are very welcome:

  1. Open an issue describing the fix or the resource you'd add (with a short note on why it's good).
  2. 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.

About

A beginner friendly material to start with. These resources can be used as training material for freshers.

Resources

Stars

169 stars

Watchers

4 watching

Forks

Releases

Packages

Contributors