Class RedirectViewControllerRegistration
java.lang.Object
org.springframework.web.servlet.config.annotation.RedirectViewControllerRegistration
Assist with the registration of a single redirect view controller.
- Since:
- 4.1
- Author:
- Rossen Stoyanchev
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
protected ParameterizableViewController
protected void
setApplicationContext
(ApplicationContext applicationContext) setContextRelative
(boolean contextRelative) Whether to interpret a given redirect URL that starts with a slash ("/") as relative to the current ServletContext, i.e.setKeepQueryParams
(boolean propagate) Whether to propagate the query parameters of the current request through to the target redirect URL.setStatusCode
(HttpStatus statusCode) Set the specific redirect 3xx status code to use.
-
Constructor Details
-
RedirectViewControllerRegistration
-
-
Method Details
-
setStatusCode
Set the specific redirect 3xx status code to use.If not set,
RedirectView
will selectHttpStatus.MOVED_TEMPORARILY (302)
by default. -
setContextRelative
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
Whether to propagate the query parameters of the current request through to the target redirect URL.Default is
false
. -
setApplicationContext
-
getUrlPath
-
getViewController
-