Summary

In this chapter, we learned how to define a controller and the usage of the @Controller annotation. After that, we learned the concept of relative request mapping, where we saw how to define request mapping at the controller level and understood how Spring relatively maps a web request to the controller request mapping method. We then learned about the role of a controller in Spring MVC and about how the dispatcher servlet uses handler mapping to find out the exact handler methods. We also saw various parameter binding techniques, such as URI template patterns, matrix variables, and HTTP GET request parameters to bind parameters with URLs. Finally, we saw how to implement a master detail view.

In the next chapter, we are going to explore ...

Get Spring MVC Beginner’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.