Special Bean Types In the WebApplicationContext
The Spring DispatcherServlet
uses special beans to process requests and render theappropriate views. These beans are part of Spring MVC. You can choose which specialbeans to use by simply configuring one or more of them in theWebApplicationContext
.However,
you don’t need to do that initially since Spring MVC maintains a list ofdefault beans to use if you don’t configure any. More on that in the next section. Firstsee the table below listing the special bean types the
DispatcherServlet
relies on.
Table 17.1. Special bean types in the WebApplicationContext
Bean type | Explanation |
---|---|
Maps incoming requests to handlers and a list of pre- and post-processors (handler interceptors) based on some criteria the details of which vary by | |
HandlerAdapter |
Helps the |
Maps exceptions to views also allowing for more complex exception handling code. | |
Resolves logical String-based view names to actual | |
Resolves the locale a client is using and possibly their time zone, in order to be able to offer internationalized views | |
Resolves themes your web application can use, for example, to offer personalized layouts | |
Parses multi-part requests for example to support processing file uploads from HTML forms. | |
Stores and retrieves the "input" and the "output" |