Class RedirectViewControllerRegistration

  • java.lang.Object
    • org.springframework.web.servlet.config.annotation.RedirectViewControllerRegistration

  • public class RedirectViewControllerRegistration
    extends java.lang.Object
    Assist with the registration of a single redirect view controller.
    Rossen Stoyanchev
    • Constructor Detail

      • RedirectViewControllerRegistration

        public RedirectViewControllerRegistration(java.lang.String urlPath,
                                                  java.lang.String redirectUrl)
    • Method Detail

      • setContextRelative

        public RedirectViewControllerRegistration setContextRelative(boolean contextRelative)
        Whether to interpret a given redirect URL that starts with a slash ("/") as relative to the current ServletContext, i.e. as relative to the web application root.

        Default is true.

      • setKeepQueryParams

        public RedirectViewControllerRegistration setKeepQueryParams(boolean propagate)
        Whether to propagate the query parameters of the current request through to the target redirect URL.

        Default is false.

      • getUrlPath

        protected java.lang.String getUrlPath()