In Episode 2 we poured the foundation — the project, every dependency, and all the configuration in one place. Before we build a single feature on top of it, we build the part that most tutorials skip entirely: error handling . Episode 3 is about making every failure look the same. When something goes wrong in an API — a bad password, a duplicate email, an expired token — the client should get back one predictable shape, with the right HTTP status and a stable error code it can actually program against. No stack traces leaking to users. No endpoint returning 200 OK with an error buried inside. Today we build that backbone: a response envelope, a set of typed exceptions, and one handler that translates all of them. What you’ll learn in Episode 3 This episode is the first real code of the series — and it’s deliberately unglamorous, because a consistent error contract is what makes everything after it pleasant to build. By the end you...
In Episode 1 we drew the whole blueprint — nine endpoints, the security filter chain, JWT with refresh-token rotation, Redis, and PostgreSQL. Today we pour the foundation. Episode 2 is where the project comes into existence. We generate it, wire up every single dependency, set up all the configuration in one place, and understand the entry point — so that when the real code starts in Episode 3, we’re building on something solid instead of a mystery pom.xml we copy-pasted off the internet. No business logic yet. Just a clean, deliberate skeleton for a production-grade Spring Boot 4 authentication service. What you’ll learn in Episode 2 This is a hands-on, IDE walkthrough episode. The philosophy: a foundation you don’t understand is a foundation you can’t debug. So instead of pasting a pom and moving on, we go dependency by dependency and explain why each one earns its place. By the end you’ll be able to: Generate a Spring Bo...