Package io.micronaut.http.annotation
Annotation Type Consumes
-
@Documented @Retention(RUNTIME) @Target({METHOD,TYPE}) @Inherited public @interface ConsumesAn annotation to indicate the
MediaTypes produced by a particular component.Generally with controllers one can use the
consumesattribute of theControllerannotation, however this annotation is more generic and applies to any component- Since:
- 1.0
-
-
Element Detail
-
value
java.lang.String[] value
- Returns:
- The
MediaTypevalues that this component is able to consume
- Default:
- {"application/json"}
-
-
-
single
@AliasFor(annotation=io.micronaut.core.async.annotation.SingleResult.class, member="value") boolean singleApplies to clients that return reactive types.
This member indicates whether the response handling should stream or wait until the full response is read. Normally this annotation is unnecessary unless the declared type doesn't indicate how many items are emitted.
- Returns:
- True if only a single result is emitted
- Default:
- false
-
-