Spring Annotations
Annotation | Location | Meaning |
---|---|---|
@RestController | Class | This class will handle requests to some URLs |
@GetMapping @PostMapping... | Method | This method will handle requests for a particular URL/HTTP method combo |
@PathVariable | Method Parameter | This parameter should come from the URL (based on a URL template) |
@RequestParam | Method Parameter | This parameter should come from a query string parameter (by name) |
@RequestBody | Method Parameter | This parameter should come from the request body (deserialized) |
@RequestHeader | Method Parameter | This parameter should come from a request header (by name) |
13 / 31