Annotation Interface Produces
An annotation to indicate the
MediaTypes produced by a particular component.
Generally with controllers one can use the
produces attribute of the
however this annotation is more generic and applies to any component
- Graeme Rocher
Optional Element Summary
MediaTypevalues that this component is able to produce
In the case of reactive types this member indicates whether only a single result is returned. Normally this annotation is unnecessary unless the declared type doesn't indicate how many items are emitted.
For JSON with single = false if an Reactive streams Publisher type is returned these will be automatically wrapped in an Array type to ensure valid JSON is returned.
If single = true it is expected that only a single result will be emitted and the result will not be wrapped in a JSON array.
- True if only a single result is emitted