Spring Different View Resolvers




 

AbstractCachingViewResolver:
AbstractCachingViewResolver caches views.
Views required to be prepared before they get in use.
Extending AbstractCachingViewResolver provides caching.
  
XmlViewResolver:
It is an Implementation of ViewResolver that takes a XML configuration file with the same DTD as Spring’s XML beans.
The default configuration file is /WEB-INF/views.xml.
  
ResourceBundleViewResolver:
It is an Implementation of ViewResolver that uses ResourceBundle based bean definitions.
Here the resource bundle is a properties file, which is located in the classpath and default file name views.properties.
  
UrlBasedViewResolver:
It is an Implementation of the ViewResolver interface that protvides the resolution of logical view names to URLs, without the need of an explicit mapping definition. This is decent when the logical name match the name of your view resource in a straightforward way, without need for arbitrary mappings.
  
InternalResourceViewResolver:  
It is subclass of UrlBasedViewResolver that support InternalResourceView (Servlets and JSPs) and subclasses such as JstlView and TilesView. You can provide the view class for all views generated by this InternalResourceViewResolver class using its method setViewClass(..).
    
VelocityViewResolver/FreeMarkerViewResolver:

It is subclass of UrlBasedViewResolver that supports FreeMarkerView or VelocityView respectively, and other custom subclasses of the same.
  
ContentNegotiatingViewResolver:
It is an Implementation of ViewResolver interface that resolves the view based on Accept header or request file name.