public class RedirectViewControllerRegistration extends Object
Constructor and Description |
---|
RedirectViewControllerRegistration(String urlPath,
String redirectUrl) |
Modifier and Type | Method and Description |
---|---|
protected String |
getUrlPath() |
protected ParameterizableViewController |
getViewController() |
protected void |
setApplicationContext(ApplicationContext applicationContext) |
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.
|
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 void setApplicationContext(@Nullable ApplicationContext applicationContext)
protected String getUrlPath()
protected ParameterizableViewController getViewController()