Spring MVC Full Guide

TheTechDude
12 min readSep 5, 2023

In this article, I will describe Spring MVC in details so you can totally nail your Spring technical interview. The article turned out a bit large, but it covers all main Spring MVC concepts in one place.

What is covered:

  • Spring MVC request workflow
  • Spring MVC modules
  • 15 main Spring MVC annotations
  • Link to free HD PDF cheatsheet

What is Spring MVC

The Spring MVC framework provides an architecture based on the Model-View-Controller (MVC) pattern, utilising loosely coupled ready-made components. The MVC pattern divides application concerns (input logic, business logic, and UI logic) while ensuring loose coupling between them.

  • Model encapsulates and combines application data, typically consisting of Plain Old Java Objects (POJOs).
  • View is responsible for displaying Model data, often generating HTML that we see in our web browsers.
  • Controller (referred to as Request Handler in Spring terminology) handles user requests, creates the corresponding Model, and passes it for display in the View.

Strictly speaking, Spring MVC doesn’t introduce new scopes for beans, as the scopes for web-related work are found in org.springframework.spring-web, not in…

--

--

TheTechDude

Software Engineer. Financial Literacy Advocate. I like helping people to learn stuff.