Skip to main content

ViewResolver

Learn ViewResolver (Model & View, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Fresher Notes ViewResolver is an interface with one method, View resolveViewName(String viewName, Locale locale) , that returns a View or null. Purpose : it decouples the controller from the view technology (JSP, Thymeleaf, FreeMarker, PDF). With ModelAndView : the view name you put in ModelAndView is exactly the string given to the resolver.

More lessons in Model & View