public abstract class ViewResolverSupport extends Object implements Ordered
ViewResolver
implementations with shared properties.Modifier and Type | Field and Description |
---|---|
static MediaType |
DEFAULT_CONTENT_TYPE
The default
content-type for views. |
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
ViewResolverSupport() |
Modifier and Type | Method and Description |
---|---|
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.
|
public static final MediaType DEFAULT_CONTENT_TYPE
content-type
for views.public void setSupportedMediaTypes(List<MediaType> supportedMediaTypes)
public List<MediaType> getSupportedMediaTypes()
public void setDefaultCharset(Charset defaultCharset)
public Charset getDefaultCharset()
public void setOrder(int order)
The default value is Ordered.LOWEST_PRECEDENCE
, meaning non-ordered.
Ordered.getOrder()
public int getOrder()
Ordered
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
in interface Ordered
Ordered.HIGHEST_PRECEDENCE
,
Ordered.LOWEST_PRECEDENCE