Class ViewControllerRegistration
java.lang.Object
org.springframework.web.servlet.config.annotation.ViewControllerRegistration
Assist with the registration of a single view controller.
- Since:
- 3.1
- Author:
- Rossen Stoyanchev, Keith Donald
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
protected ParameterizableViewController
protected void
setApplicationContext
(ApplicationContext applicationContext) setStatusCode
(HttpStatusCode statusCode) Set the status code to set on the response.void
setViewName
(String viewName) Set the view name to return.
-
Constructor Details
-
ViewControllerRegistration
-
-
Method Details
-
setStatusCode
Set the status code to set on the response. Optional.If not set the response status will be 200 (OK).
-
setViewName
Set the view name to return. Optional.If not specified, the view controller will return
null
as the view name in which case the configuredRequestToViewNameTranslator
will select the view name. TheDefaultRequestToViewNameTranslator
for example translates "/foo/bar" to "foo/bar".- See Also:
-
setApplicationContext
-
getUrlPath
-
getViewController
-