Loading tutorials
spring-boot-starter-web dependency. You should know the basics of dependency injection.2 min read@RestController and know what GET, POST, PUT, PATCH and DELETE mean in HTTP. It covers how Spring MVC picks a controller method from the HTTP method and the URL, and which errors to expect when the mapping is wrong.2 min read@RestController, know the @GetMapping family of annotations, and understand HTTP methods and status codes. It covers how Spring MVC copies values from the URL into method arguments.2 min read@RestController with @GetMapping and @PostMapping, and that you know Java records. You will see how Spring Boot turns Java objects into JSON and back, and why the objects you expose should be separate DTOs.2 min read@RestController with @PostMapping. It also assumes you have a Spring Boot web project, where Jackson is already on the classpath through spring-boot-starter-web.2 min read@RestController with @GetMapping and @PostMapping methods. It also assumes you know common HTTP status codes and headers. By the end, you will know when returning a plain object is enough and when you need ResponseEntity to control the status code a2 min read@RestController that accepts a JSON body with @RequestBody, and that you know what a record is. It covers how Spring checks incoming data before your controller logic runs.2 min read@RestController, bind a @RequestBody, and validate it with @Valid. It also assumes you know basic HTTP status codes. Here you will turn exceptions into consistent JSON error responses in one place.2 min read@RestController, bind query parameters, and call a service layer. It builds on the GET /api/books endpoint from earlier chapters.2 min read@RestController, map methods with @GetMapping and @PostMapping, and read the Accept and Content-Type HTTP headers. Here you will see how Spring MVC picks the format of a response and how to restrict what an endpoint accepts and produces.2 min read@RestController with a service dependency, you know JUnit 5 basics, and you have spring-boot-starter-test on the test classpath. Spring Boot web projects include it by default when generated from Spring Initializr.2 min read