Skip to content

Java Beginner

Hub › Java › Beginner

What you'll build

A single HTTP endpoint at GET /items served by a Spring Boot application. It returns a fixed list of three items as JSON, runs locally on port 8080, and answers a curl from a second terminal. No database, no auth, no front end — just a JVM process, an embedded Tomcat, and one controller. Building this is the point of every page in this tier.

The ladder

  1. 01 Install JDK 21 — get the JVM toolchain so every later page can run.
  2. 02 Install Maven — the build tool we use to compile and run the Spring app.
  3. 03 Classes and primitives — the minimum vocabulary to read Java code.
  4. 04 Methods — Java's reusable unit at this tier.
  5. 05 Records — modern data classes that will become our response shape.
  6. 06 CollectionsList.of(...) for the fixed data we return.
  7. 07 What Spring Boot is — the framework that does the routing and the Tomcat plumbing.
  8. 08 Create a Spring Boot project — generate the project on Spring Initializr.
  9. 09 First controller — wire one path to one method with @RestController.
  10. 10 Returning JSON from a record list — return a List<Record> and let Spring serialize it.
  11. 11 GET /items — the tier exit artifact.

Start01 Install JDK 21