Card 06/ 06

RecapDifficulty: Advanced1 min

What This Topic Established

@GetMapping, @PostMapping, @PutMapping and @DeleteMapping each name a verb and a path. @PathVariable, @RequestParam and @RequestBody each read from a different part of the request — the URL, the query string, and the body.

The ResponseEntity factory method matters, not just the status code it implies — created() sets Location, notFound() and ok() don't. @RestController puts the return value in the response body; @Controller treats it as a view name, verified: identical code, a 200 from one and a 404 from the other.