In Chapter 17, “Introduction to Spring MVC” you built two simple Spring MVC applications using some old style controllers. The controllers were classes that implemented the Controller interface. Spring 2.5 introduced a new way of creating controllers: by using the Controller annotation type.
This chapter discusses annotation-based controllers and the various annotation types that can be beneficial to your applications.
Spring MVC Annotation Types
There are several advantages of using annotation-based controllers. For one, a controller class can handle multiple actions. (By contrast, a controller that implements the Controller interface can only handle one action.) This means, related actions ...