Spring Boot

Spring Boot Practice Exercises

Build production-style Spring Boot backends through hands-on challenges, one concept at a time.

Spring Boot 4.1Spring Boot 4.1Java 25Java 25
Read the Spring Boot overview
Module 1

Beans & Dependency Injection

Learn how Spring wires your objects together: registering beans, injecting them without new, choosing between them, and configuring them from properties.

4
About this challenge

This problem covers turning a list of ordered items into a printed receipt, and adding up the right total at the bottom.

About this challenge

This problem covers picking the correct temperature converter for the unit asked for, and which one to use when none is named.

About this challenge

This problem covers keeping a set of on/off switches for features, and where their starting values come from.

About this challenge

This problem covers sending a message through the channel the user picked, and what to fall back to when the channel isn't recognized.

Module 2

REST Controllers & Endpoints

Learn how Spring turns classes into HTTP endpoints: mapping routes to methods, reading path variables and query parameters, binding request bodies, and returning the right status codes.

4
About this challenge

This problem covers adding, listing, and removing shows, and what to answer when someone asks for one that isn't there.

About this challenge

This problem covers recording bird sightings and finding them by species, and what to show when nothing matches.

About this challenge

This problem covers changing stored state from a request, and telling apart a slot that is empty from one that does not exist.

About this challenge

This problem covers keeping child records inside their own parent, so one series never shows another series' issues.

Module 3

Validation and Error Handling

Learn how Spring checks a request before your code runs: applying field constraints, writing your own validation rules, catching every failure in one place, and answering with a consistent error body.

4
About this challenge

This problem covers checking an application form field by field before it is accepted, including an age cutoff on the date of birth.

About this challenge

This problem covers writing your own validation rule that looks at several fields together and reports the first thing that is wrong.

About this challenge

This problem covers turning every kind of failure in the application into one consistent error response.

About this challenge

This problem covers collecting every broken rule on a request instead of stopping at the first, and reporting them in a fixed order.

Module 4

JPA Persistence Basics

Learn how Spring stores your data: mapping classes to tables, saving and loading through repositories, updating a row in place instead of adding a new one, and letting the database enforce its own rules.

4
About this challenge

This problem covers putting a service between the controller and the database, and storing inspections under the hive they belong to.

About this challenge

This problem covers the full set of database-backed endpoints for plant schedules, including updating a row in place rather than adding a new one.

About this challenge

This problem covers letting the database enforce uniqueness and turning the resulting failure into the right response.

About this challenge

This problem covers linking games to their owner and reading a sorted list back for one owner at a time.

Module 5

Querying and Filtering

Learn how Spring builds queries for you: deriving them from method names, combining filters that may or may not be supplied, writing your own JPQL when derivation runs out, and keeping results in a fixed order.

4
About this challenge

This problem covers searching vendors by several optional filters that can be combined in any way.

About this challenge

This problem covers filtering listings by a price range and other options, with the results always ordered newest first.

About this challenge

This problem covers returning results one page at a time, with a capped page size and a consistent page envelope.

About this challenge

This problem covers finding rooms that are free across a date range, without counting a booking that ends on the day the new one starts.

Module 6 · Coming soon

DTOs, Mapping and Pagination

Learn how Spring shapes what leaves your API: mapping entities to response objects, keeping internal fields out of the payload, projecting only the columns a view needs, and returning results one page at a time.

4

Museum Exhibit Management API

mediumNo attempts yet

Veterinary Visit Records

mediumNo attempts yet

Job Board Search & Pagination

mediumNo attempts yet

Aquarium Species Directory

mediumNo attempts yet
Module 7 · Coming soon

Security: Authentication & Authorization

Learn how Spring Security guards your app: identifying callers from credentials or tokens, storing passwords in encoded form, restricting endpoints by role, and answering rejected requests in your own format.

4

Locker Room PIN Access

mediumNo attempts yet

Newsroom Editor Permissions

mediumNo attempts yet

Clinic Staff Role Gate

mediumNo attempts yet

API Key Issuer

mediumNo attempts yet
Module 8 · Coming soon

File Handling and Storage

Learn how Spring handles files: receiving multipart uploads, checking type and size before anything is stored, cleaning up the supplied filename, and serving the stored bytes back unchanged.

4

Passport Photo Upload

mediumNo attempts yet

Lecture Slide Repository

mediumNo attempts yet

CSV Bulk Import Handler

mediumNo attempts yet

Scanned Receipt Vault

mediumNo attempts yet
Module 9 · Coming soon

Scheduling and Async Work

Learn how Spring runs work off the request thread: enabling scheduled execution, putting a job on a fixed rate or a cron, handing work to a thread pool, and retrying what fails.

4

Greenhouse Sensor Poller

medium0 / 1 solved

Overdue Fine Calculator Job

mediumNo attempts yet

Bulk Email Dispatch Queue

mediumNo attempts yet

Nightly Sales Digest Builder

mediumNo attempts yet
Module 10 · Coming soon

Events and Messaging

Learn how Spring lets components talk without knowing each other: publishing events, handling them in the background, waiting until the transaction commits, and staying correct when the same event arrives twice.

4

Warehouse Stock Change Notifier

hardNo attempts yet

Order Lifecycle Event Chain

hardNo attempts yet

Loyalty Points Award Listener

hardNo attempts yet

Airport Gate Change Broadcast System

hardNo attempts yet
Module 11 · Coming soon

Transactions and Concurrency

Learn how Spring keeps data correct under load: marking transaction boundaries, rolling back cleanly, locking rows optimistically or pessimistically, and making a retried request apply only once.

4

Seat Hold Reservation Lock

hardNo attempts yet

Wallet Top-Up Retry Guard

hardNo attempts yet

Ticket Counter Race Guard

hardNo attempts yet

Interbank Fund Settlement Ledger

hardNo attempts yet
Module 12 · Coming soon

Microservices and Resilience

Learn how Spring talks to other services: calling them over HTTP, resolving their address at call time, timing out and retrying, and falling back when one of them is down.

4

Service Registry Lookup Client

hardNo attempts yet

Edge Router with Rate Limiting

hardNo attempts yet

Fallback Cache for Downstream Outage

hard0 / 1 solved

Ride Hailing Dispatch Platform

hard1 / 2 solved

About this path

This path covers the core of a Spring Boot 4 backend: beans and dependency injection, REST controllers, validation and error handling, JPA persistence, and querying. You should be able to write basic Java before you start. No earlier Spring experience is needed. The querying module is about search and filtering, with challenges such as a hotel room availability query.

Frequently asked questions

4

What will I practice in this path?

5 modules: Beans & Dependency Injection, REST Controllers & Endpoints, Validation and Error Handling, JPA Persistence Basics and Querying and Filtering. More modules are on the way.

How many challenges are there, and how hard are they?

20 challenges, all easy.

What does this path run on?

Challenges run on Spring Boot 4.1 and Java 25.

Do I need to install anything?

No. Every challenge runs in a browser-based IDE with everything already set up, and your code is graded automatically against a test suite.

We use cookies that are necessary to run Staffcoder, and optional analytics cookies to see which pages get used. Analytics stays off unless you accept. Read our Cookie Policy.