public class ViewControllerRegistration extends Object
Constructor and Description |
---|
ViewControllerRegistration(String urlPath) |
Modifier and Type | Method and Description |
---|---|
protected String |
getUrlPath() |
protected ParameterizableViewController |
getViewController() |
protected void |
setApplicationContext(ApplicationContext applicationContext) |
ViewControllerRegistration |
setStatusCode(HttpStatus statusCode)
Set the status code to set on the response.
|
void |
setViewName(String viewName)
Set the view name to return.
|
public ViewControllerRegistration(String urlPath)
public ViewControllerRegistration setStatusCode(HttpStatus statusCode)
If not set the response status will be 200 (OK).
public void setViewName(String viewName)
If not specified, the view controller will return null
as the
view name in which case the configured RequestToViewNameTranslator
will select the view name. The DefaultRequestToViewNameTranslator
for example translates "/foo/bar" to "foo/bar".
DefaultRequestToViewNameTranslator
protected void setApplicationContext(ApplicationContext applicationContext)
protected String getUrlPath()
protected ParameterizableViewController getViewController()