In this video, start the presentation layer by discussing the central component of Spring MVC, the controller, and how it interacts with the dispatcher servlet.
- [Instructor] So now that we've gone through…all of the basics underneath, it's time for us…to really jump into the visuals.…In the beginning of the visuals,…with spring MVC, is the controller itself.…So let's take a step back and talk about…the model-view-controller pattern.…And essentially it contains three distinct points.…The model, which is our data,…the view, which is what the user sees…or in the case of restful services what the system sees,…and then the controller.…
And that really is the piece that does…all of the coordinating between them.…So in Spring MVC the controller itself…is the main abstraction point.…And it has its own annotation,…which is, as we might imagine, at controller.…All of the requests respond through…what is called the DispatcherServlet.…And the DispatcherServlet is actually mapped…to URLs through the request mapping annotation.…
And the way that that works, and we're going to look…at this in more detail when we get into the code,…is that each method is annotated with a request mapping.…
- Creating a project with Spring Initializr
- Examining the Spring Boot skeleton project with Spring Data JPA
- Creating an embedded database for Spring Boot development and testing
- Building a service abstraction
- Using the IoC paradigm in Spring to develop a service layer
- Building a controller
- Testing a controller MockMvc
- Exposing a service layer through REST
Skill Level Intermediate
Q: This course was updated on 09/06/2018. What changed?
A: The following topics were updated: creating a project with Spring Initializr, examining the Spring Boot skeleton project, developing a service object with Spring, and testing a controller MockMvc.