Reputation: 503
I started developing a Spring MVC + Thymeleaf (for the V) recently and I'm trying to understand how it works.
Let's say I have a controller method like this:
@RequestMapping(value = "/")
public String index() {
return "home";
}
And a template called home.html.
What is reponsible for routing the controller to the respective view? Is it thymeleaf? Or the Spring framework?
Thank you
Upvotes: 0
Views: 254
Reputation: 3809
Spring's ViewResolver
(s) do this:
https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/servlet/ViewResolver.html
Which view resolver(s) are active and where they look for templates is customizable based on your individual Spring configuration.
Upvotes: 3