View Resolver in Spring MVC
View resolver is used to resolve “view name” that returned from the controller class to a physical view page or JSP page.
1. InternalResourceViewResolver
InternalResourceViewResolver is used to resolve “internal resource view” (in simple, it’s final output, jsp or htmp page) based on a predefined URL pattern. In additional, it allow you to add some predefined prefix or suffix to the view name (prefix + view name + suffix), and generate the final view page URL.
2. XmlViewResolver
XmlViewResolver is used to resolve “view name” based on view beans in the XML file. By default, XmlViewResolver will loads the view beans from /WEB-INF/views.xml, however, this location can be overridden through the “location” property
3. ResourceBundleViewResolver
ResourceBundleViewResolver is used to resolve “view named” based on view beans in “.properties” file.
By default, ResourceBundleViewResolver will loads the view beans from file views.properties, which located at the root of the project class path. However, this location can be overridden through the “basename” property.
