Top Description Methods
org.springframework.web.bind.annotation

public @Interface PatchMapping

extends Annotation
Annotations
@Target:METHOD
@Retention:RUNTIME
@Documented
@RequestMapping
method:PATCH
Imports
java.lang.annotation.Documented, .ElementType, .Retention, .RetentionPolicy, .Target, org.springframework.core.annotation.AliasFor

Annotation for mapping HTTP PATCH requests onto specific handler methods.

Specifically, @PatchMapping is a composed annotation that acts as a shortcut for @RequestMapping(method = RequestMethod.PATCH).

Note

This annotation cannot be used in conjunction with other @RequestMapping annotations that are declared on the same method. If multiple @RequestMapping annotations are detected on the same method, a warning will be logged, and only the first mapping will be used. This applies to @RequestMapping as well as composed @RequestMapping annotations such as @GetMapping, @PostMapping, etc.

Author
Sam Brannen
Since
4.3
See Also
GetMapping, PostMapping, PutMapping, DeleteMapping, RequestMapping

Method Summary

Modifier and TypeMethod and Description
public String[]
public String[]
public String
public String[]
public String[]
public String[]
public String[]
Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

consumesback to summary
public String[] consumes()

Alias for RequestMapping#consumes.

Annotations
@AliasFor
annotation:RequestMapping
headersback to summary
public String[] headers()

Alias for RequestMapping#headers.

Annotations
@AliasFor
annotation:RequestMapping
nameback to summary
public String name()

Alias for RequestMapping#name.

Annotations
@AliasFor
annotation:RequestMapping
paramsback to summary
public String[] params()

Alias for RequestMapping#params.

Annotations
@AliasFor
annotation:RequestMapping
pathback to summary
public String[] path()

Alias for RequestMapping#path.

Annotations
@AliasFor
annotation:RequestMapping
producesback to summary
public String[] produces()

Alias for RequestMapping#produces.

Annotations
@AliasFor
annotation:RequestMapping
valueback to summary
public String[] value()

Alias for RequestMapping#value.

Annotations
@AliasFor
annotation:RequestMapping