@Target(value=METHOD) @Retention(value=RUNTIME) @Documented @RequestMapping(method=GET) public @interface GetMapping
GET
requests onto specific handler
methods.
Specifically, @GetMapping
is a composed annotation that
acts as a shortcut for @RequestMapping(method = RequestMethod.GET)
.
@GetMapping
& @RequestMapping
@GetMapping
does not support the consumes
attribute of @RequestMapping
.
PostMapping
,
PutMapping
,
DeleteMapping
,
PatchMapping
,
RequestMapping
Modifier and Type | Optional Element and Description |
---|---|
String[] |
headers
Alias for
RequestMapping.headers() . |
String |
name
Alias for
RequestMapping.name() . |
String[] |
params
Alias for
RequestMapping.params() . |
String[] |
path
Alias for
RequestMapping.path() . |
String[] |
produces
Alias for
RequestMapping.produces() . |
String[] |
value
Alias for
RequestMapping.value() . |
@AliasFor(annotation=RequestMapping.class) public abstract String name
RequestMapping.name()
.@AliasFor(annotation=RequestMapping.class) public abstract String[] value
RequestMapping.value()
.@AliasFor(annotation=RequestMapping.class) public abstract String[] path
RequestMapping.path()
.@AliasFor(annotation=RequestMapping.class) public abstract String[] params
RequestMapping.params()
.@AliasFor(annotation=RequestMapping.class) public abstract String[] headers
RequestMapping.headers()
.@AliasFor(annotation=RequestMapping.class) public abstract String[] produces
RequestMapping.produces()
.