Document that WebFlux does not support forward redirects

Closes gh-33441
This commit is contained in:
Brian Clozel 2024-09-05 16:02:42 +02:00
parent 5e3c5d466f
commit 046724b940
1 changed files with 6 additions and 1 deletions

View File

@ -184,9 +184,11 @@ xref:web/webflux/reactive-spring.adoc#webflux-exception-handler[Exceptions] in t
View resolution enables rendering to a browser with an HTML template and a model without
tying you to a specific view technology. In Spring WebFlux, view resolution is
supported through a dedicated xref:web/webflux/dispatcher-handler.adoc#webflux-resulthandling[HandlerResultHandler] that uses
`ViewResolver` instances to map a String (representing a logical view name) to a `View`
`ViewResolver` instances to map a String (representing a logical view name) to a `View`
instance. The `View` is then used to render the response.
Web applications need to use a xref:web/webflux-view.adoc[View rendering library] to support this use case.
[[webflux-viewresolution-handling]]
=== Handling
@ -238,6 +240,9 @@ operate in terms of logical view names. A view name such as
`redirect:/some/resource` is relative to the current application, while a view name such as
`redirect:https://example.com/arbitrary/path` redirects to an absolute URL.
NOTE: xref:web/webmvc/mvc-servlet/viewresolver.adoc#mvc-redirecting-forward-prefix[Unlike the Servlet stack],
Spring WebFlux does not support "FORWARD" dispatches, so `forward:` prefixes are not supported as a result.
[[webflux-multiple-representations]]
=== Content Negotiation