Creating the request handlers
We will now build the handlers that are used to serve the HTTP requests from our Ext JS client. These handlers will be added to a new web
directory, as shown in the following screenshot:
Each handler will use the Spring Framework @Controller
annotation to indicate that the class serves the role of a "controller". Strictly speaking, the handlers that we will be defining are not controllers in the traditional sense of a Spring MVC application. We will only be using a very small portion of the available Spring controller functionality to process requests. This will ensure that our request handling layer is very lightweight and easy to maintain. As always, we will start by creating a base class that all the handlers will implement.
Defining the AbstractHandler superclass
The AbstractHandler
superclass defines several important methods that are used to simplify JSON generation. As we are working toward integration with Ext JS 4 clients, the structure of the JSON object...