Concept
A @RestController maps HTTP requests to methods with @GetMapping, @PostMapping and friends, and turns return values into JSON. Path variables, query parameters and the body arrive as method arguments.
The tutor works through these with you, in conversation and code. A session ends when you have shown them, not when a video does.
A few lines that show Controllers and mappings doing its job.
@RestController
@RequestMapping("/api/orders")
public class OrderController {
private final OrderService orders;
OrderController(OrderService orders) { this.orders = orders; }
@GetMapping("/{id}")
OrderView get(@PathVariable UUID id) { return orders.get(id); }
@PostMapping
@ResponseStatus(HttpStatus.CREATED)
OrderView create(@RequestBody @Valid CreateOrder request) { return orders.create(request); }
}Returning JPA entities straight from controllers. Lazy relationships serialise unpredictably, every schema change becomes an API change, and fields you never meant to expose leak out.
Your roadmap puts these before Controllers and mappings, unless you already know them.
Once a session shows you understand Controllers and mappings, it comes back for review. Each review takes a minute and tells the memory model how well you still know it.
Topics that build on Controllers and mappings.