Loading tutorials
BookController and explains the annotations, the request flow, and the errors you are most likely to meet.5 min read@RestController, know what GET, POST, PUT, PATCH and DELETE mean in HTTP, and have a Spring Boot web project that starts. You will learn how Spring MVC picks a controller method for a request, how the shortcut annotations relate to @RequestMapping, and 5 min read@RestController with @GetMapping, as covered earlier, and that you know what a URL path and a query string are.5 min read@RestController does, and have a Spring Boot web project with `spring6 min read@RestController with @PostMapping, you know what a record is, and you know the HTTP basics: Content-Type, 400, and 415. Bean Val6 min read@RestController with @GetMapping and @PostMapping. You should also know how @RequestBody binds JSON to a DTO. Here you learn how to control the status code, headers, and body of a resp5 min read@RestController, accept JSON with @RequestBody, and read basic annotations on Java records. It also assumes you have a Spring Boot web project set up with Maven or Gradle.5 min read@RestController, bind a @Valid @RequestBody DTO, and delegate to a service class. It covers how to turn exceptions into consistent, well-formed HTTP error responses.4 min read@RestController with @GetMapping, read query parameters, and call a service layer. It also assumes you know basic Spring Data JPA repositories. You will add paging and sorting to the book list endpoint and see where the defaults can hurt you.5 min read@RestController with @GetMapping and @PostMapping methods, and that you know the Accept and Content-Type headers. It builds on the BookController, BookResponse and CreateBookRequest types from earlier chapters.6 min readBookController, BookService, the record DTOs, ApiExceptionHandler, and basic JUnit 5 and Mockito usage. The examples use Spring Boot 3.4 or later and the spring-boot-starter-test dependency.4 min read