Support 'produces' and 'consumes' attributes in @DeleteMapping

Issue: SPR-13992
This commit is contained in:
Sam Brannen 2016-03-07 18:13:20 +01:00
parent bea26413b4
commit cbcc9998f1
1 changed files with 12 additions and 3 deletions

View File

@ -32,9 +32,6 @@ import static org.springframework.web.bind.annotation.RequestMethod.DELETE;
*
* <p>Specifically, {@code @DeleteMapping} is a <em>composed annotation</em> that
* acts as a shortcut for {@code @RequestMapping(method = RequestMethod.DELETE)}.
* Furthermore, this annotation does not support the
* {@link RequestMapping#method method}, {@link RequestMapping#consumes consumes},
* and {@link RequestMapping#produces produces} attributes of {@code @RequestMapping}.
*
* @author Sam Brannen
* @since 4.3
@ -80,4 +77,16 @@ public @interface DeleteMapping {
@AliasFor(annotation = RequestMapping.class)
String[] headers() default {};
/**
* Alias for {@link RequestMapping#consumes}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] consumes() default {};
/**
* Alias for {@link RequestMapping#produces}.
*/
@AliasFor(annotation = RequestMapping.class)
String[] produces() default {};
}