Skip to content

ViewResolver

ViewResolver is a component within the [[Spring MVC|Spring MVC]] architecture that acts as a strategy for the DispatcherServlet.^[600-developer-java-spring-dispatcherservlet.md]

Function

It is responsible for resolving view names, typically returned by controllers, into actual View objects.^[600-developer-java-spring-dispatcherservlet.md] This abstraction decouples the controller logic from the specific view technology (e.g., JSP, Thymeleaf) being used.

Implementation

A common implementation provided by Spring is the InternalResourceViewResolver.^[600-developer-java-spring-dispatcherservlet.md]

Sources

  • 600-developer-java-spring-dispatcherservlet.md