类 ViewResolverSupport
- java.lang.Object
- org.springframework.web.reactive.result.view.ViewResolverSupport
- 所有已实现的接口:
Ordered
- 直接已知子类:
UrlBasedViewResolver
public abstract class ViewResolverSupport extends Object implements Ordered
Base class forViewResolver
implementations with shared properties.- 从以下版本开始:
- 5.0
- 作者:
- Rossen Stoyanchev, Juergen Hoeller
字段概要
字段 修饰符和类型 字段 说明 static MediaType
DEFAULT_CONTENT_TYPE
The defaultcontent-type
for views.从接口继承的字段 org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
构造器概要
构造器 构造器 说明 ViewResolverSupport()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 Charset
getDefaultCharset()
Return the default charset, used when the content type does not contain one.int
getOrder()
Get the order value of this object.List<MediaType>
getSupportedMediaTypes()
Return the configured media types supported by this view.void
setDefaultCharset(Charset defaultCharset)
Set the default charset for this view, used when the content type does not contain one.void
setOrder(int order)
Specify the order value for this ViewResolver bean.void
setSupportedMediaTypes(List<MediaType> supportedMediaTypes)
Set the supported media types for this view.
字段详细资料
DEFAULT_CONTENT_TYPE
public static final MediaType DEFAULT_CONTENT_TYPE
The defaultcontent-type
for views.
构造器详细资料
ViewResolverSupport
public ViewResolverSupport()
方法详细资料
setSupportedMediaTypes
public void setSupportedMediaTypes(List<MediaType> supportedMediaTypes)
Set the supported media types for this view. Default is "text/html;charset=UTF-8".
getSupportedMediaTypes
public List<MediaType> getSupportedMediaTypes()
Return the configured media types supported by this view.
setDefaultCharset
public void setDefaultCharset(Charset defaultCharset)
Set the default charset for this view, used when the content type does not contain one. Default is UTF 8.
getDefaultCharset
public Charset getDefaultCharset()
Return the default charset, used when the content type does not contain one.
setOrder
public void setOrder(int order)
Specify the order value for this ViewResolver bean.The default value is
Ordered.LOWEST_PRECEDENCE
, meaning non-ordered.- 另请参阅:
Ordered.getOrder()
getOrder
public int getOrder()
从接口复制的说明:Ordered
Get the order value of this object.Higher values are interpreted as lower priority. As a consequence, the object with the lowest value has the highest priority (somewhat analogous to Servlet
load-on-startup
values).Same order values will result in arbitrary sort positions for the affected objects.
- 指定者:
getOrder
在接口中Ordered
- 返回:
- the order value
- 另请参阅:
Ordered.HIGHEST_PRECEDENCE
,Ordered.LOWEST_PRECEDENCE