Spring MVC
Spring MVC is Spring’s web framework for handling HTTP requests and responses using the Model-View-Controller pattern.
Testing Spring Boot Applications
Spring MVC is Spring's servlet-based web application framework for handling HTTP requests and constructing web applications.
- How it is used
- Provides the servlet-based web stack whose HTML pages and HTTP APIs are exercised in Spring Boot tests.
- How deep it goes
- Explains the servlet server’s role and works through request assertions, stopping short of MVC dispatch internals.
- Examples
- Uses a weather application’s index page, JSON weather endpoint, and POST request to demonstrate response checks.
- What you can do after
- Apply it via MockMvcTester to check MVC responses without starting embedded Tomcat.
Read how Testing Spring Boot Applications explains Spring MVC →
Spring Start Here, Second Edition
Spring MVC is the Spring web framework for developing applications that handle HTTP requests.
- How it is used
- Supports web request handling and REST endpoints in Spring applications.
- How deep it goes
- Summarizes controller configuration, response handling, and exception handling without detailing MVC component internals.
- Examples
- Uses controller annotations, HTML responses, ResponseEntity, and REST controller advice to illustrate request handling.
- What you can do after
- Apply it via Spring MVC to configure controller actions and handle REST requests and responses.
Read how Spring Start Here, Second Edition explains Spring MVC →
Spring in Action, Sixth Edition
Spring MVC is Spring's web framework for implementing model-view-controller applications and handling HTTP requests.
- How it is used
- Builds Spring web frontends and REST APIs by routing HTTP requests through annotated controller methods.
- How deep it goes
- Explains controller annotations, view selection, model data, validation, and Boot autoconfiguration, while deferring deeper REST and reactive treatment.
- Examples
- Uses a root-path HomeController, a home view, Thymeleaf templates, custom taco forms, model data, and REST API output.
- What you can do after
- Build it from scratch by defining annotated controllers, mapping requests, passing model data, selecting views, and processing validated forms.
Read how Spring in Action, Sixth Edition explains Spring MVC →
Test Driven: Practical TDD and Acceptance TDD for Java Developers
Spring MVC is the web framework module of Spring Framework for building Java web applications using the Model-View-Controller pattern.
- How it is used
- Handles Java web requests through controller classes that return view instructions for Spring MVC to process.
- How deep it goes
- Defines the Controller and ModelAndView workflow and demonstrates login handling and testing, without detailing broader framework configuration.
- Examples
- Uses a failed-login view, a valid-login view, and request/response doubles in controller tests.
- What you can do after
- Practice test-driving controller behavior by invoking its request handler with request and response doubles and checking the returned view.
Read how Test Driven: Practical TDD and Acceptance TDD for Java Developers explains Spring MVC →
Also covered in
What to know first
- HTMLHTML is the standard markup language for structuring content and elements in documents on the web.
- JDBCJDBC (Java Database Connectivity) is the standard Java API for connecting to databases, executing SQL statements, and processing results.
- Model–view–controllerModel–view–controller is a software architectural pattern that separates application data and behavior, presentation, and interaction handling into model, view, and controller responsibilities.
Related concepts
- controllerhas part · A controller is a software component that receives input or requests and coordinates other components or operations to produce a response or change application state.
- http+sse transportused by · HTTP+SSE transport is a communication mechanism that uses HTTP requests and Server-Sent Events for server-to-client streaming between an MCP client and server.
- JavaBean Validation APIuses · The JavaBean Validation API is a Java standard for declaring and evaluating constraints on object properties, data, and executable parameters.
- @postmappinguses · @PostMapping is a Spring MVC annotation that maps HTTP POST requests to a controller method.
- @requestmappinguses · @RequestMapping is a Spring annotation that associates HTTP request patterns and conditions with controller classes or handler methods.
Questions about Spring MVC
What is Spring MVC?
Spring MVC is Spring’s web framework for handling HTTP requests and responses using the Model-View-Controller pattern.
Which Manning books explain Spring MVC?
Testing Spring Boot Applications, Spring Start Here, Second Edition, Spring in Action, Sixth Edition and Test Driven: Practical TDD and Acceptance TDD for Java Developers.
What should I know before learning Spring MVC?
Manning books that teach Spring MVC usually introduce HTML, Java, JDBC and Model–view–controller first.
What are the parts of Spring MVC?
Spring MVC includes controller.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.



