A Hands-On Course
From your first endpoint to a tested, portfolio-ready Library Management API β one tightly-scoped lesson at a time.
@SpringBootApplication, @RestController, the embedded server β from empty folder to a live GET /hello.Book record, return objects and lists, and see how Jackson turns them into JSON; tidy routes with a @RequestMapping base path.@RequestBody, @PathVariable, status codes & ResponseEntity.@Entity, JpaRepository, a PostgreSQL database via Docker Compose, Liquibase migrations, derived queries.@ManyToMany with a join table, a migration that carries existing data across, Set vs List, and DTOs to keep entities off the wire.@Valid, Bean Validation, and global handling with @ControllerAdvice + ProblemDetail β clean 400, 404 and 409 responses.Pageable/Page, ?page=&size=&sort=, a stable JSON page shape, and a max-page-size safety cap.@EntityGraph.@WebMvcTest and MockMvcTester: the controllers' routes, JSON, status codes and ProblemDetail bodies, tested without a server.@DataJpaTest against a real PostgreSQL from Testcontainers: the derived queries, the @EntityGraph fetch and what a write leaves in the tables, tested for real.@SpringBootTest on a random port with RestTestClient: the whole application, its real database and its HTTP API, tested the way a client uses them.