Add consumes attribute to @GetMapping
Issue: SPR-14988
This commit is contained in:
committed by
Rossen Stoyanchev
parent
1b0e95d7d8
commit
8315a4033f
@@ -31,9 +31,6 @@ import org.springframework.core.annotation.AliasFor;
|
||||
* <p>Specifically, {@code @GetMapping} is a <em>composed annotation</em> that
|
||||
* acts as a shortcut for {@code @RequestMapping(method = RequestMethod.GET)}.
|
||||
*
|
||||
* <h5>Difference between {@code @GetMapping} & {@code @RequestMapping}</h5>
|
||||
* <p>{@code @GetMapping} does not support the {@link RequestMapping#consumes consumes}
|
||||
* attribute of {@code @RequestMapping}.
|
||||
*
|
||||
* @author Sam Brannen
|
||||
* @since 4.3
|
||||
@@ -79,6 +76,13 @@ public @interface GetMapping {
|
||||
@AliasFor(annotation = RequestMapping.class)
|
||||
String[] headers() default {};
|
||||
|
||||
/**
|
||||
* Alias for {@link RequestMapping#consumes}.
|
||||
* @since 4.3.5
|
||||
*/
|
||||
@AliasFor(annotation = RequestMapping.class)
|
||||
String[] consumes() default {};
|
||||
|
||||
/**
|
||||
* Alias for {@link RequestMapping#produces}.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user