A Hands-On Course

Building REST APIs with Spring Boot

From your first endpoint to a tested, portfolio-ready Library Management API — one tightly-scoped lesson at a time.

The mission Become job-ready as a Java backend developer. Every lesson builds one feature of a Library Management API (authors & books) you can show and discuss in interviews.

Lessons

  1. SDKMAN + Spring Boot CLI, @SpringBootApplication, @RestController, the embedded server — from empty folder to a live GET /hello.
    Ready
  2. Model a Book record, return objects and lists, and see how Jackson turns them into JSON; tidy routes with a @RequestMapping base path.
    Ready
  3. Extract a service, constructor injection, and why it makes code testable.
    Ready
  4. POST/PUT/DELETE, @RequestBody, @PathVariable, status codes & ResponseEntity.
    Ready
  5. @Entity, JpaRepository, a PostgreSQL database via Docker Compose, Liquibase migrations, derived queries.
    Ready
  6. @OneToMany/@ManyToOne, owning vs inverse side, and DTOs to avoid leaking entities.
    Ready
  7. @Valid, Bean Validation, and global handling with @ControllerAdvice + ProblemDetail.
    Ready
  8. Pageable/Page, ?page=&size=&sort=, a stable JSON page shape, and a max-page-size safety cap.
    Ready
  9. See N+1 in the SQL log, turn off open-session-in-view to fail loud, and fix it with @EntityGraph.
    Ready
  10. JUnit 5, Mockito & AssertJ — verify the service's logic with fakes, no Spring, no database.
    Ready
  11. More Testing — Web, Data & Integration
    @WebMvcTest + MockMvc, @DataJpaTest + Testcontainers, and full @SpringBootTest.
    Soon
  12. Polish for Your Portfolio
    README, OpenAPI/Swagger docs, project structure, push to GitHub.
    Soon

Reference

Trusted resources