Skip to content

Commit d183927

Browse files
committed
Update the return-types.adocs
1 parent 13ae5a7 commit d183927

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

framework-docs/modules/ROOT/pages/web/webflux/controller/ann-methods/return-types.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,15 @@ Reactor provides a dedicated operator for that, `Flux#collectList()`.
8484
to be written (however, `text/event-stream` must be requested or declared in the mapping
8585
through the `produces` attribute).
8686

87+
| `Flux<DataBuffer>`
88+
| Write raw data buffers to the response, for example, when handling file
89+
downloads or proxying data.
90+
91+
| `Resource`
92+
| Return a single resource that is written to the response using `ResourceHttpMessageWriter`.
93+
94+
Notice, this writer overrides your response's `Content-Type` header, make sure you're intending to do so.
95+
8796
| Other return values
8897
| If a return value remains unresolved in any other way, it is treated as a model
8998
attribute, unless it is a simple type as determined by

framework-docs/modules/ROOT/pages/web/webmvc/mvc-controller/ann-methods/return-types.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@ supported for all return values.
9595
collected to a List and rendered as a single value. See xref:web/webmvc/mvc-ann-async.adoc[Asynchronous Requests] and
9696
xref:web/webmvc/mvc-ann-async.adoc#mvc-ann-async-reactive-types[Reactive Types].
9797

98+
| `Resource`
99+
| Return a single resource that is written to the response using
100+
`ResourceHttpMessageConverter` implementations.
101+
102+
Notice, this writer overrides your response's `Content-Type` header, make sure you're intending to do so.
103+
98104
| Other return values
99105
| If a return value remains unresolved in any other way, it is treated as a model
100106
attribute, unless it is a simple type as determined by

0 commit comments

Comments
 (0)