SpringSource/spring-framework — pull request #62 by poutsma (2012-04-03 11:51:13+00:00)
Title: Add abstract WebApplicationInitializers

These two commits adds three abstract WebApplicationInitializers, to be used
for a typical setup of a Spring Web application.

* AbstractContextLoaderInitializer provides an abstract base class for
setting up the ContextLoaderListener.
* AbstractDispatcherServletInitializer provides an abstract base class
for setting up one or more DispatcherServlets, with an optional root
context.
* AbstractAnnotationConfigDispatcherServletInitializer provides an
abstract base class for setting up DispatcherServlets based on
Configuration classes.

Some points for discussion:

* Packaging: I wasn't sure where to put these classes, and I am fully open for suggestions.
* Naming: I am happy about `AbstractContextLoaderInitializer` and `AbstractDispatcherServletInitializer`, but less happy about `AbstractAnnotationConfigDispatcherServletInitializer`. Open for suggestions as well.
* There are a couple of TODOs, where we have the opportunity to pass a ServletContext to a template method. I wasn't sure if the context was needed, so I left it out.

Also, this seems to have turned into two commits, while the goal was to have one. Blame my git ignorance.