public class DefaultServerRedirectStrategy extends java.lang.Object implements ServerRedirectStrategy
ServerRedirectStrategy to use.| Constructor and Description |
|---|
DefaultServerRedirectStrategy() |
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<java.lang.Void> |
sendRedirect(org.springframework.web.server.ServerWebExchange exchange,
java.net.URI location)
Performs a redirect based upon the provided
ServerWebExchange and URI |
void |
setContextRelative(boolean contextRelative)
Sets if the location is relative to the context.
|
void |
setHttpStatus(org.springframework.http.HttpStatus httpStatus)
The
HttpStatus to use for the redirect. |
public reactor.core.publisher.Mono<java.lang.Void> sendRedirect(org.springframework.web.server.ServerWebExchange exchange,
java.net.URI location)
ServerRedirectStrategyServerWebExchange and URIsendRedirect in interface ServerRedirectStrategyexchange - the ServerWebExchange to uselocation - the location to redirect toMono<Void> to indicate when redirect is completepublic void setHttpStatus(org.springframework.http.HttpStatus httpStatus)
HttpStatus to use for the redirect.httpStatus - the status to use. Cannot be nullpublic void setContextRelative(boolean contextRelative)
contextRelative - if redirects should be relative to the context.
Default is true.