Class ViewResolverSupport

All Implemented Interfaces:
Direct Known Subclasses:

public abstract class ViewResolverSupport extends Object implements Ordered
Base class for ViewResolver implementations with shared properties.
Rossen Stoyanchev, Juergen Hoeller
  • Field Details


      public static final MediaType DEFAULT_CONTENT_TYPE
      The default content-type for views.
  • Constructor Details

    • ViewResolverSupport

      public ViewResolverSupport()
  • Method Details

    • 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.

      See Also:
    • getOrder

      public int getOrder()
      Description copied from interface: 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.

      Specified by:
      getOrder in interface Ordered
      the order value
      See Also: