Support 'produces' attribute in @[Post|Put|Patch]Mapping
Issue: SPR-13992
This commit is contained in:
parent
78690a24fb
commit
bea26413b4
|
|
@ -32,9 +32,6 @@ import static org.springframework.web.bind.annotation.RequestMethod.PATCH;
|
||||||
*
|
*
|
||||||
* <p>Specifically, {@code @PatchMapping} is a <em>composed annotation</em> that
|
* <p>Specifically, {@code @PatchMapping} is a <em>composed annotation</em> that
|
||||||
* acts as a shortcut for {@code @RequestMapping(method = RequestMethod.PATCH)}.
|
* acts as a shortcut for {@code @RequestMapping(method = RequestMethod.PATCH)}.
|
||||||
* Furthermore, this annotation does not support the
|
|
||||||
* {@link RequestMapping#method method} and {@link RequestMapping#produces produces}
|
|
||||||
* attributes of {@code @RequestMapping}.
|
|
||||||
*
|
*
|
||||||
* @author Sam Brannen
|
* @author Sam Brannen
|
||||||
* @since 4.3
|
* @since 4.3
|
||||||
|
|
@ -86,4 +83,10 @@ public @interface PatchMapping {
|
||||||
@AliasFor(annotation = RequestMapping.class)
|
@AliasFor(annotation = RequestMapping.class)
|
||||||
String[] consumes() default {};
|
String[] consumes() default {};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Alias for {@link RequestMapping#produces}.
|
||||||
|
*/
|
||||||
|
@AliasFor(annotation = RequestMapping.class)
|
||||||
|
String[] produces() default {};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,9 +32,6 @@ import static org.springframework.web.bind.annotation.RequestMethod.POST;
|
||||||
*
|
*
|
||||||
* <p>Specifically, {@code @PostMapping} is a <em>composed annotation</em> that
|
* <p>Specifically, {@code @PostMapping} is a <em>composed annotation</em> that
|
||||||
* acts as a shortcut for {@code @RequestMapping(method = RequestMethod.POST)}.
|
* acts as a shortcut for {@code @RequestMapping(method = RequestMethod.POST)}.
|
||||||
* Furthermore, this annotation does not support the
|
|
||||||
* {@link RequestMapping#method method} and {@link RequestMapping#produces produces}
|
|
||||||
* attributes of {@code @RequestMapping}.
|
|
||||||
*
|
*
|
||||||
* @author Sam Brannen
|
* @author Sam Brannen
|
||||||
* @since 4.3
|
* @since 4.3
|
||||||
|
|
@ -86,4 +83,10 @@ public @interface PostMapping {
|
||||||
@AliasFor(annotation = RequestMapping.class)
|
@AliasFor(annotation = RequestMapping.class)
|
||||||
String[] consumes() default {};
|
String[] consumes() default {};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Alias for {@link RequestMapping#produces}.
|
||||||
|
*/
|
||||||
|
@AliasFor(annotation = RequestMapping.class)
|
||||||
|
String[] produces() default {};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,9 +32,6 @@ import static org.springframework.web.bind.annotation.RequestMethod.PUT;
|
||||||
*
|
*
|
||||||
* <p>Specifically, {@code @PutMapping} is a <em>composed annotation</em> that
|
* <p>Specifically, {@code @PutMapping} is a <em>composed annotation</em> that
|
||||||
* acts as a shortcut for {@code @RequestMapping(method = RequestMethod.PUT)}.
|
* acts as a shortcut for {@code @RequestMapping(method = RequestMethod.PUT)}.
|
||||||
* Furthermore, this annotation does not support the
|
|
||||||
* {@link RequestMapping#method method} and {@link RequestMapping#produces produces}
|
|
||||||
* attributes of {@code @RequestMapping}.
|
|
||||||
*
|
*
|
||||||
* @author Sam Brannen
|
* @author Sam Brannen
|
||||||
* @since 4.3
|
* @since 4.3
|
||||||
|
|
@ -86,4 +83,10 @@ public @interface PutMapping {
|
||||||
@AliasFor(annotation = RequestMapping.class)
|
@AliasFor(annotation = RequestMapping.class)
|
||||||
String[] consumes() default {};
|
String[] consumes() default {};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Alias for {@link RequestMapping#produces}.
|
||||||
|
*/
|
||||||
|
@AliasFor(annotation = RequestMapping.class)
|
||||||
|
String[] produces() default {};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue