Class DefaultServerRedirectStrategy

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultServerRedirectStrategy

        public DefaultServerRedirectStrategy()
    • Method Detail

      • sendRedirect

        public reactor.core.publisher.Mono<java.lang.Void> sendRedirect​(org.springframework.web.server.ServerWebExchange exchange,
                                                                        java.net.URI location)
        Description copied from interface: ServerRedirectStrategy
        Performs a redirect based upon the provided ServerWebExchange and URI
        Specified by:
        sendRedirect in interface ServerRedirectStrategy
        Parameters:
        exchange - the ServerWebExchange to use
        location - the location to redirect to
        Returns:
        Mono<Void> to indicate when redirect is complete
      • setHttpStatus

        public void setHttpStatus​(org.springframework.http.HttpStatus httpStatus)
        The HttpStatus to use for the redirect.
        Parameters:
        httpStatus - the status to use. Cannot be null
      • setContextRelative

        public void setContextRelative​(boolean contextRelative)
        Sets if the location is relative to the context.
        Parameters:
        contextRelative - if redirects should be relative to the context. Default is true.