public class RedirectViewControllerRegistration
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private ParameterizableViewController |
controller |
private RedirectView |
redirectView |
private java.lang.String |
urlPath |
Constructor and Description |
---|
RedirectViewControllerRegistration(java.lang.String urlPath,
java.lang.String redirectUrl) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getUrlPath() |
protected ParameterizableViewController |
getViewController() |
RedirectViewControllerRegistration |
setContextRelative(boolean contextRelative)
Whether to interpret a given redirect URL that starts with a slash ("/")
as relative to the current ServletContext, i.e.
|
RedirectViewControllerRegistration |
setKeepQueryParams(boolean propagate)
Whether to propagate the query parameters of the current request through
to the target redirect URL.
|
RedirectViewControllerRegistration |
setStatusCode(HttpStatus statusCode)
Set the specific redirect 3xx status code to use.
|
private final java.lang.String urlPath
private final RedirectView redirectView
private final ParameterizableViewController controller
public RedirectViewControllerRegistration(java.lang.String urlPath, java.lang.String redirectUrl)
public RedirectViewControllerRegistration setStatusCode(HttpStatus statusCode)
If not set, RedirectView
will select HttpStatus.MOVED_TEMPORARILY (302)
by default.
public RedirectViewControllerRegistration setContextRelative(boolean contextRelative)
Default is true
.
public RedirectViewControllerRegistration setKeepQueryParams(boolean propagate)
Default is false
.
protected java.lang.String getUrlPath()
protected ParameterizableViewController getViewController()