Spring Annotations

AnnotationLocationMeaning
@RestController ClassThis class will handle requests to some URLs
@GetMapping @PostMapping... MethodThis method will handle requests for a particular URL/HTTP method combo
@PathVariable Method ParameterThis parameter should come from the URL (based on a URL template)
@RequestParam Method ParameterThis parameter should come from a query string parameter (by name)
@RequestBody Method ParameterThis parameter should come from the request body (deserialized)
@RequestHeader Method ParameterThis parameter should come from a request header (by name)

13 / 31