A path variable is a value embedded in a URL path and passed to a controller method parameter. In /api/tacos/{id}, {id} is a placeholder for a taco's actual ID. section 7.1.1
Fetching one taco
@GetMapping("/{id}") public Optional<Taco> tacoById(@PathVariable("id") Long id) { return tacoRepo.findById(id); } With a controller base path of /api/tacos, a request to /api/tacos/42 binds 42 to id. The repository then uses that value to find the Taco. section 7.1.1

