类 ViewControllerRegistration
java.lang.Object
cn.taketoday.web.config.ViewControllerRegistration
Assist with the registration of a single view controller.
- 从以下版本开始:
- 4.0 2022/2/18 22:21
- 作者:
- Rossen Stoyanchev, Keith Donald, Harry Yang
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected Stringprotected ParameterizableViewControllerprotected voidsetApplicationContext(cn.taketoday.context.ApplicationContext applicationContext) setContentType(String contentType) Set the content-type to return.setReturnValue(HttpRequestHandler handler) setReturnValue(Object returnValue) Set the resultsetReturnValue(Supplier<Object> objectSupplier) setStatusCode(HttpStatusCode statusCode) Set the status code to set on the response.setViewName(String viewName) Set the view name to return.
-
字段详细资料
-
urlPath
-
controller
-
-
构造器详细资料
-
ViewControllerRegistration
-
-
方法详细资料
-
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
nullas the view name in which case the configuredRequestToViewNameTranslatorwill select the view name. TheDefaultRequestToViewNameTranslatorfor example translates "/foo/bar" to "foo/bar". -
setContentType
Set the content-type to return. Optional. -
setReturnValue
Set the result -
setReturnValue
-
setReturnValue
-
setApplicationContext
protected void setApplicationContext(@Nullable cn.taketoday.context.ApplicationContext applicationContext) -
getUrlPath
-
getViewController
-