request mapping

The annotations, such as @GetMapping("/orders/{id}"), that connect an HTTP method and path to a controller method.

In more detail

The path and verb are public API: clients, caches and documentation depend on them, so changing either is a contract change. Use nouns for resource paths and let the HTTP method express the operation.

Example

@GetMapping("/orders/{id}")

Related terms

Taught in

References