Level 3 · Advanced Internals & Integration¶
Goal: stop treating Spring as a black box. This level opens the mechanisms you have been relying on — how auto-configuration decides what exists, how a proxy turns an annotation into behavior, why lazy loading generates hundreds of queries — and then uses that understanding to integrate with the world outside your process: caches, background work, message brokers, other HTTP services, and monitoring systems.
By the end you will build an event-driven order service that publishes and consumes Kafka messages reliably, calls a flaky downstream service safely, and exposes health and metrics for operations.
Modules¶
- How Auto-Configuration Really Works — imports files,
@Conditionalevaluation, ordering, and writing your own starter - AOP & Proxies — JDK vs CGLIB proxies, advice types, writing an aspect, and the limits of proxy-based AOP
- The N+1 Problem & Fetch Strategies — detecting it, join fetch, entity graphs, batch fetching, and DTO queries
- Caching with Spring Cache —
@Cacheable, eviction, Caffeine and Redis, keys, and stampedes - Async Execution & Scheduling —
@Async, executors, virtual threads,@Scheduled, and running jobs on one node - Messaging with Apache Kafka — producers, consumers, partitions, offsets, retries, dead-letter topics, and the outbox pattern
- HTTP Clients & Resilience —
RestClient, HTTP interfaces, timeouts, retries, and circuit breakers - Actuator, Health & Metrics — endpoints, health groups and probes, Micrometer metrics, and securing it all
- Bean Lifecycle & Application Events — from definition to destruction, and decoupling with events
- Project — An Event-Driven Order Service — orders, Kafka, outbox, a resilient payment client, and observability
What you need before starting¶
- Levels 1 and 2, in particular
@Transactionaland the persistence context — this level explains why they behave as they do. - Docker, for Kafka and Redis in some lessons. Lessons state clearly which examples need external infrastructure and which run with nothing but the JDK.
- Comfort reading stack traces: several lessons ask you to find a proxy class in one.