Sheet ⁨10⁩ · ⁨Roadmaps⁩Surveyed ⁨2026⁩

Java & Spring Developer Beginner to Expert

An ordered path from Java syntax and the JVM through Spring dependency injection, Spring Boot, REST APIs, Spring Data JPA, Spring Security, testing, messaging, Spring Cloud, and deployment.

Published:
Updated:
12 Stages
Intermediate

Almost everyone learning Spring learns it in the wrong order. They start with Boot, because Boot is the part that produces a running application quickly, and end up with a framework that works but cannot be reasoned about. The fix is boring: learn the Java underneath first, then learn the container, and only then the annotations.

Every box inside the green area is a bean the container created and wired, which is why stage 5 comes before everything after it. Two details worth noticing early: Spring Security runs in the filter chain before your controller, so an unauthorised request never reaches your code, and the JVM foundations at the bottom include the fact that a @Service is a singleton shared by every request thread.

Two topics in here are worth more than their position suggests.

Concurrency is in stage 3, and it’s the one people skip hardest. A @Service is a singleton, so every request thread calls the same instance. Mutable field state in one is a race condition that will pass every test you write on your laptop and fail under load in a way that looks like a database problem.

And Spring AOP is in stage 5 because it explains the most confusing behaviour in the whole framework. @Transactional and @Cacheable work through a proxy the container wraps around your bean, which means calling an annotated method from another method of the same class bypasses the annotation entirely. People lose hours to that one, and it takes ten minutes to understand once you know proxies are involved.

Stages are ordered by dependency rather than by difficulty. Topics marked required are the ones you’ll be asked about and the ones you’ll debug; recommended and optional can wait until a real project asks for them.

01
1

Java language foundations

4 topics·3 required·1 recommended
The part people skip, and the reason Spring later feels like magic rather than a library. Target Java 21 or a later LTS.

Syntax, types, and control flow

Required

Primitives against their boxed wrappers, the difference between == and equals, string immutability, and why switch expressions and pattern matching in modern Java remove most of the verbosity people still associate with the language.

Classes, interfaces, and records

Required

Encapsulation, inheritance and composition, plus records for immutable data carriers. A record replaces about forty lines of getters, equals, hashCode and toString, and it is the right default for a DTO.

What the JVM actually does

Required

Compilation to bytecode, class loading, the heap against the stack, and garbage collection at a conceptual level. You do not need to tune a collector yet, but you do need to know that an OutOfMemoryError and a StackOverflowError have different causes.

Interfaces with default methods, sealed types

Recommended

Default methods are how the standard library evolved without breaking implementers, and sealed interfaces let you close a hierarchy so pattern matching can be exhaustive. Both show up in modern framework code.

02
2

Collections, generics, and streams

4 topics·4 required
You cannot read a Spring method signature without generics, and you cannot write idiomatic service code without streams.

The collections framework

Required

List, Set, Map, Deque, and which implementation to choose. ArrayList against LinkedList in practice, HashMap against TreeMap against LinkedHashMap, and the contract between equals and hashCode that makes a HashSet work at all.

Generics, bounded types, and wildcards

Required

Type parameters, extends and super bounds, and why List<? extends Number> is read-only. Type erasure explains most generics error messages, including why you cannot write new T[].

Streams and collectors

Required

map, filter, flatMap, reduce, and Collectors.groupingBy. Streams are lazy until a terminal operation runs, and a stream is single-use. Reach for a loop when the stream version is harder to read, which happens more often than stream enthusiasts admit.

Optional, used properly

Required

Spring Data returns Optional, so this matters immediately. Use map, filter and orElseThrow; calling .get() without checking defeats the entire purpose. Optional is for return values, not for fields or parameters.

03
3

Exceptions and concurrency

5 topics·4 required·1 recommended
The stage that separates people who can debug a production Spring application from people who cannot.

Checked against unchecked exceptions

Required

When to use each, and why Spring wraps checked JDBC exceptions in unchecked DataAccessException subclasses. Never swallow an exception silently, and never catch Exception to make a compiler complaint go away.

try-with-resources

Required

Any AutoCloseable is closed automatically, in reverse order, including when the body throws. It is the correct way to handle a stream, a connection or a file, and it removes an entire class of resource leak.

Threads, and why a Spring bean is shared

Required

The single most important concurrency fact for a Spring developer: a @Service is a singleton, and every request thread calls the same instance. Mutable field state in one is a race condition that passes every test on your machine and fails under load.

The concurrency toolkit

Required

ExecutorService, CompletableFuture, AtomicInteger, ConcurrentHashMap, and the synchronized keyword. Prefer immutability and the concurrent collections over hand-written locking.

Virtual threads

Recommended

Project Loom, stable since Java 21. A blocking call on a virtual thread no longer ties up an OS thread, which changes the calculus for thread-per-request web applications and is why Spring Boot 3.2 can turn them on with one property.

04
4

Build tools and project layout

3 topics·2 required·1 recommended
Short stage, but everything after it assumes you can add a dependency and read a build failure.

Maven fundamentals

Required

The POM, the build lifecycle, dependency scopes, and transitive resolution. mvn dependency:tree is the command that resolves most version conflicts, and knowing that the nearest definition wins explains the ones it does not.

Gradle fundamentals

Recommended

The alternative, with a Kotlin or Groovy DSL and better incremental build performance. Worth being able to read even if your team uses Maven, because a lot of library documentation assumes it.

Spring Boot starters and dependency management

Required

A starter is a curated set of dependencies with versions already reconciled. This is why you add spring-boot-starter-web without a version and why overriding one Spring version by hand usually breaks something else.

05
5

Spring core and dependency injection

5 topics·5 required
The conceptual centre of the whole ecosystem. Learn the container before you learn the annotations, or every later stage will feel like magic.

Inversion of control and the application context

Required

Your code stops constructing its collaborators and declares what it needs instead. The container builds the object graph and hands dependencies in. Every annotation you learn later is a way of describing something to this container.

Beans, scopes, and lifecycle

Required

Singleton by default, plus prototype and request scopes. @PostConstruct and @PreDestroy hooks, and why a singleton depending on a request-scoped bean needs a proxy.

Constructor injection, and why not field injection

Required

Constructor injection makes dependencies explicit, allows final fields, fails fast on a missing bean, and lets you build the object in a unit test without a container. Field injection with @Autowired does none of that. Prefer constructors, always.

Component scanning and configuration

Required

@Component, @Service, @Repository and @Controller are all component stereotypes with different semantic intent. @Configuration with @Bean methods is how you register something you do not own the source of.

Spring AOP and proxies

Required

How @Transactional, @Cacheable and @Async actually work: the container hands you a proxy that wraps your bean. This explains the single most confusing Spring behaviour, that calling an annotated method from another method of the same class bypasses the annotation entirely.

06
6

Spring Boot fundamentals

4 topics·3 required·1 optional
Boot is Spring with the configuration decided for you. Knowing what it decided is the difference between using it and fighting it.

Auto-configuration, and how to see it

Required

Boot configures beans based on what is on the classpath, and backs off when you define your own. Run with --debug for the auto-configuration report showing every decision and its reason. This turns Boot from magic into something you can reason about.

Configuration properties and profiles

Required

application.yml, @ConfigurationProperties for type-safe binding with validation, and profiles for per-environment values. Learn the property resolution order, because an environment variable silently overriding your YAML is a confusing hour otherwise.

The embedded server

Required

Tomcat by default, with Jetty and Undertow as alternatives. Your application is a jar that starts a server rather than a war deployed into one, which is what makes containerising it straightforward.

Spring Boot DevTools

Optional

Automatic restart on classpath change and sensible development defaults. A small quality-of-life gain that shortens the feedback loop.

07
7

REST APIs with Spring MVC

6 topics·5 required·1 recommended
The layer most of your work happens in, and the layer where design decisions age badly if you get them wrong early.

Controllers and request mapping

Required

@RestController, @GetMapping and friends, @PathVariable, @RequestParam, @RequestBody. Return an object and let Jackson serialise it rather than building JSON by hand.

DTOs, and why entities do not belong in a response

Required

Returning a JPA entity from a controller couples your API to your schema, leaks fields you did not mean to expose, and triggers lazy-loading exceptions during serialisation. Map to a record. This is the single most valuable habit in this stage.

Validation with Bean Validation

Required

@Valid on the parameter plus @NotNull, @Size, @Email and custom constraints on the DTO. Validation belongs at the boundary, so invalid input never reaches your service layer.

Global exception handling

Required

@RestControllerAdvice with @ExceptionHandler methods, returning a consistent error shape. Follow RFC 9457 problem details, which Spring 6 supports natively, rather than inventing your own error envelope.

API documentation with OpenAPI

Recommended

springdoc-openapi generates a specification and a Swagger UI from your controllers and DTOs. Generated documentation stays accurate; hand-written documentation does not.

Pagination and sorting

Required

Pageable and Page in a controller signature, wired straight through to Spring Data. Any endpoint returning a collection needs this before it reaches production, not after a customer with 40,000 rows finds it.

08
8

Data access with Spring Data JPA and Hibernate

7 topics·6 required·1 recommended
The stage with the most expensive mistakes. Spring Data is easy; Hibernate is not, and pretending otherwise is how N+1 queries reach production.

Entities, mappings, and relationships

Required

@Entity, @Id, generation strategies, and @OneToMany, @ManyToOne, @ManyToMany with their owning side. Default to FetchType.LAZY on every association, because EAGER loads a graph you did not ask for on every query.

Repositories and derived queries

Required

Extend JpaRepository and Spring generates the implementation. Method-name derivation such as findByEmailAndActiveTrue, with @Query for JPQL when a name would become unreadable.

The N+1 query problem

Required

Loading 100 orders and then a customer for each is 101 queries. Fix it with a JOIN FETCH, an @EntityGraph, or a projection that selects only what you need. Turn on SQL logging and count your queries; almost every slow endpoint is this.

Transactions and propagation

Required

@Transactional belongs on the service, because the transaction boundary is a business decision rather than a persistence detail. Understand propagation and the default rollback rule, which rolls back on an unchecked exception and, surprisingly, not on a checked one.

The persistence context and lazy loading

Required

Entities are managed inside a transaction and detached outside it, which is why touching a lazy collection in a controller throws LazyInitializationException. Fetch what you need inside the boundary and map to a DTO before leaving it.

Schema migrations with Flyway or Liquibase

Required

ddl-auto is a development convenience and a production hazard. Versioned migration scripts in source control are the only defensible way to evolve a schema, and Boot runs them at startup.

Projections and native queries

Recommended

An interface or record projection selects only the columns you need, which is often a large win over loading full entities. Drop to a native query when JPQL cannot express what the database can, and accept the loss of portability.

09
9

Spring Security

6 topics·6 required
The steepest learning curve in the ecosystem, mostly because it operates before your code runs and the failures are therefore silent from your perspective.

The filter chain

Required

Security is a chain of servlet filters that runs before your controller, which is why an unauthorised request never reaches your code and why you cannot debug it by adding logging there. Learn to read the chain, and use logging.level.org.springframework.security=DEBUG.

Authentication and authorisation

Required

Authentication establishes identity; authorisation decides what that identity may do. SecurityFilterChain configuration, @PreAuthorize for method-level rules, and the difference between a role and an authority.

Password storage

Required

PasswordEncoder with bcrypt or Argon2, and DelegatingPasswordEncoder so stored hashes carry their algorithm prefix and can be migrated. Never store a password reversibly, and never write your own hashing.

JWT and stateless authentication

Required

Issuing and validating tokens, choosing an expiry, and the refresh-token pattern. Understand what a JWT cannot do: you cannot revoke one before it expires without server-side state, which is the tradeoff people discover too late.

OAuth2 and OpenID Connect

Required

Spring Security as a resource server validating tokens, and as a client performing a login flow. The authorisation code flow with PKCE is the correct choice for a browser or mobile client; the implicit flow is deprecated.

CSRF, CORS, and the security headers

Required

When CSRF protection is needed and when it is not, why a stateless token API usually disables it, and how CORS differs from it entirely despite being confused with it constantly. Set the standard headers, including a content security policy.

10
10

Testing

5 topics·4 required·1 recommended
Ninth in the ordering because this is when you know enough to test properly. In practice it belongs beside every stage after it.

JUnit 5 and AssertJ

Required

Lifecycle annotations, parameterised tests, and nested test classes. AssertJ's fluent assertions produce failure messages you can read, which matters more than it sounds when a test fails in CI at 6pm.

Mockito, and what not to mock

Required

@Mock, @InjectMocks, stubbing and verification. Mock the collaborators at your boundaries, not everything: a test that mocks five things and asserts on the interactions tests your mocks rather than your logic.

Slice tests against full context tests

Required

@WebMvcTest loads only the web layer, @DataJpaTest only persistence. Both start far faster than @SpringBootTest, which loads everything. Reach for the full context only when the test genuinely spans the application.

Testcontainers

Required

A real PostgreSQL, Kafka or Redis in Docker for the duration of the test. It ends the class of bug that only appears against the real database, and it is now the default recommendation over an in-memory substitute.

Integration testing an API

Recommended

MockMvc for the servlet layer without a network, WebTestClient or TestRestTemplate against a running port. Test the contract, including error responses and validation failures, since those are what break for callers.

11
11

Messaging, caching, and performance

6 topics·3 required·2 recommended·1 optional
What you add when one synchronous request can no longer do all the work, or should not.

Asynchronous messaging with Kafka

Required

Producers, consumers, topics, partitions and consumer groups through Spring for Apache Kafka. Delivery is at-least-once, so a consumer must be idempotent. That requirement is the whole design problem, not a detail.

RabbitMQ and Spring AMQP

Recommended

The alternative model: exchanges, queues and bindings, with per-message acknowledgement. A better fit than Kafka for task queues and request-reply, and a worse fit for a replayable event log.

Caching with Spring Cache

Required

@Cacheable, @CachePut and @CacheEvict over Redis or Caffeine. The annotations are trivial; the difficulty is invalidation and choosing a TTL. Remember that the proxy means an internal method call skips the cache entirely.

Connection pooling

Required

HikariCP is the Boot default. Pool sizing is the most commonly misconfigured performance setting in Spring applications, and a bigger pool is usually slower. Match it to what the database can actually serve concurrently.

Async and scheduled work

Recommended

@Async for fire-and-forget with an explicit executor, @Scheduled for periodic tasks. Never rely on the default executor in production, and remember @Scheduled runs on every instance unless you add coordination.

JVM tuning and profiling

Optional

Heap sizing, choosing a collector, and reading a heap dump. Learn one profiler properly: async-profiler or JDK Flight Recorder. Measuring first is the difference between a fix and a guess.

12
12

Microservices, observability, and deployment

8 topics·6 required·1 recommended·1 optional
The stage to reach for only when a single deployable genuinely stops working. Most applications never need it.

When not to split

Required

A well-structured monolith beats a distributed system you did not need, because a network call between modules turns a compile error into a runtime one and a stack trace into a correlation-ID hunt. Split for independent deployment and scaling, not for tidiness.

Spring Cloud fundamentals

Recommended

Service discovery, centralised configuration, and an API gateway with Spring Cloud Gateway. Understand what each one buys you before adopting it, because each is also a component that can fail.

Resilience patterns

Required

Circuit breakers, retries with backoff, timeouts and bulkheads through Resilience4j. A retry without a backoff and a jitter is an accidental denial of service against your own dependency.

Actuator and metrics

Required

/actuator/health for readiness and liveness probes, and Micrometer publishing to Prometheus. Expose the endpoints you need on a separate port, and never expose them all publicly.

Distributed tracing and structured logging

Required

Micrometer Tracing propagating a trace ID across services, with logs emitted as JSON carrying that ID. Without this, debugging across services means correlating timestamps by hand.

Containerising a Spring Boot application

Required

Layered jars or Cloud Native Buildpacks via mvn spring-boot:build-image, so a code change does not invalidate the dependency layer. Handle SIGTERM by enabling graceful shutdown, and set container-aware heap limits.

CI/CD and deployment

Required

Build, test and image publishing in a pipeline, then a rolling deploy to Kubernetes or a managed platform. Configuration through environment variables and secrets from a real secret store rather than a file in the image.

Native images with GraalVM

Optional

Ahead-of-time compilation for startup in milliseconds and much lower memory, at the cost of longer builds and reflection configuration. Worth it for serverless or heavy horizontal scaling, and unnecessary for a long-running service.

Comments

Was this useful?

You might also enjoy

More posts on similar topics

Go Developer Beginner to Expert

Go Developer Beginner to Expert

Go is small enough that you can read the whole specification in an afternoon, and that is precisely why people plateau. The syntax stops being the obstacle within a week, and the remaining difficulty

Python Developer Beginner to Expert

Python Developer Beginner to Expert

Python is easy to start and deceptively deep, which produces a common shape of developer: fluent in syntax, productive in a framework, and unsure what happens when the code meets real traffic. This ro

Node.js Developer Beginner to Expert

Node.js Developer Beginner to Expert

Node.js Developer Beginner to Expert This roadmap takes you from JavaScript foundations and the event loop through building APIs, working with databases, streams, testing, and security, and on to r

React Developer Beginner to Expert

React Developer Beginner to Expert

React Developer Beginner to Expert This roadmap takes you from JavaScript prerequisites through JSX, hooks, and state management, and on to data fetching, meta-frameworks, performance, and testing.

Full-Stack Developer Beginner to Expert

Full-Stack Developer Beginner to Expert

Full-Stack Developer Beginner to Expert This roadmap walks you from your first web page to shipping and operating a complete production application. Work the stages in order. Build the frontend fun

Backend Developer Beginner to Expert

Backend Developer Beginner to Expert

Backend Developer Beginner to Expert This roadmap walks you from your first server-side program to designing scalable, secure systems. Work through the stages in order. Nail a language, the command

6 related posts