# Package org.springframework.web.bind.annotation

@NonNullApi @NonNullFields package org.springframework.web.bind.annotation
Annotations for binding requests to controllers and handler methods as well as for binding request parameters to method arguments.

Related Packages
Package
Description
org.springframework.web.bind
Provides web-specific data binding functionality.
org.springframework.web.bind.support
Support classes for web data binding.
Class
Description
BindParam
Annotation to bind values from a web request such as request parameters or path variables to fields of a Java object.
ControllerAdvice
Specialization of `@Component` for classes that declare `@ExceptionHandler`, `@InitBinder`, or `@ModelAttribute` methods to be shared across multiple `@Controller` classes.
CookieValue
Annotation to indicate that a method parameter is bound to an HTTP cookie.
CrossOrigin
Annotation for permitting cross-origin requests on specific handler classes and/or handler methods.
DeleteMapping
Annotation for mapping HTTP `DELETE` requests onto specific handler methods.
ExceptionHandler
Annotation for handling exceptions in specific handler classes and/or handler methods.
GetMapping
Annotation for mapping HTTP `GET` requests onto specific handler methods.
InitBinder
Annotation that identifies methods that initialize the `WebDataBinder` which will be used for populating command and form object arguments of annotated handler methods.
Mapping
Meta annotation that indicates a web mapping annotation.
MatrixVariable
Annotation which indicates that a method parameter should be bound to a name-value pair within a path segment.
ModelAttribute
Annotation that binds a method parameter or method return value to a named model attribute, exposed to a web view.
PatchMapping
Annotation for mapping HTTP `PATCH` requests onto specific handler methods.
PathVariable
Annotation which indicates that a method parameter should be bound to a URI template variable.
PostMapping
Annotation for mapping HTTP `POST` requests onto specific handler methods.
PutMapping
Annotation for mapping HTTP `PUT` requests onto specific handler methods.
RequestAttribute
Annotation to bind a method parameter to a request attribute.
RequestBody
Annotation indicating a method parameter should be bound to the body of the web request.
RequestHeader
Annotation which indicates that a method parameter should be bound to a web request header.
RequestMapping
Annotation for mapping web requests onto methods in request-handling classes with flexible method signatures.
RequestMethod
Enumeration of HTTP request methods.
RequestParam
Annotation which indicates that a method parameter should be bound to a web request parameter.
RequestPart
Annotation that can be used to associate the part of a "multipart/form-data" request with a method argument.
ResponseBody
Annotation that indicates a method return value should be bound to the web response body.
ResponseStatus
Marks a method or exception class with the status `ResponseStatus.code()` and `ResponseStatus.reason()` that should be returned.
RestController
A convenience annotation that is itself annotated with `@Controller` and `@ResponseBody`.
RestControllerAdvice
A shortcut annotation that combines `@ControllerAdvice` with `@ResponseBody`, in effect simply an `@ControllerAdvice` whose exception handler methods render to the response body.
SessionAttribute
Annotation to bind a method parameter to a session attribute.
SessionAttributes
Annotation that indicates the session attributes that a specific handler uses.
ValueConstants
Common value constants shared between bind annotations.