Skip to Main Content
Spring MVC Beginner's Guide
book

Spring MVC Beginner's Guide

by Amuthan Ganeshan
June 2014
Beginner to intermediate content levelBeginner to intermediate
304 pages
7h 25m
English
Packt Publishing
Content preview from Spring MVC Beginner's Guide

Time for action – adding class-level request mapping

Let's add a @RequestMapping annotation on our ProductController class to demonstrate the relative request mapping feature. However, before that, we just want to ensure that you have already replaced the ProductRepository reference with the ProductService reference in the ProductController class as part of the previous chapter's Time for action – creating a service object section. Because contacting the persistence layer directly from the presentation layer is not a best practice, all access to the persistence layer should go through the service layer. Perform the following steps (those who have completed this exercise can directly start from step 5; others please continue from step 1):

  1. Create ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Spring MVC Beginner's Guide - Second Edition

Spring MVC Beginner's Guide - Second Edition

Amuthan Ganeshan
Spring MVC: Designing Real-World Web Applications

Spring MVC: Designing Real-World Web Applications

Shameer Kunjumohamed, Hamidreza Sattari, Alex Bretet, Geoffroy Warin

Publisher Resources

ISBN: 9781783284870Supplemental Content