Understanding Spring MVC based application flow

As we are moving ahead with learning Spring, it’s important that we first understand the application flow of a Spring MVC based web application, which we have beautifully depicted in the below flow diagram.Integration of Thymeleaf with Spring MVC

  1. Handler mapping maps all the request mappings in the controllers. This happens at server startup.
  2. Based on the request that gets hit, dispatcher servlet asks the handler mapping as to which equivalent controller method needs to be invoked.
  3. The controller after completing it’s task finally returns a view, model and view or a simple string to the dispatcher servlet.
  4. The dispatcher servlet then checks with the view resolver and finally resolves the view returned in step 3, integrates the model to the view and renders it on the browser.

Now Thymeleaf and JSP enters at the view level.

Useful Links:


Receive our updates to your inbox

Get more stuff like this
in your inbox

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.