Currently, there is no way to add an ApplicationContextInitializer to the DispatcherServlet's ApplicationContext at runtime (i.e. without explicit configuration on the application's part). This is possible to do on the rootApplicationContext using the contextInitializerClasses Servlet init-param.
Some mechanism (accessible from a ServletContainerInitializer) should be exposed in order to influence the DispatcherServlet's ApplicationContext and allow an ApplicationContextInitializer to be added.
I've implemented this as a "globalInitializerClasses" init-param now, basically like the existing "contextInitializerClasses" but applying to FrameworkServlets as well. They are applied right at the end of context initialization but still before locally specified "contextInitializerClasses", if any, to preserve a remaining chance for overriding.
Since this implementation is rather straightforward, I'm backporting it to 3.2.7 as well. Can't remember whether you ever asked for it, but here you go :-)
Hmm, just the "globalInitializerClasses" init-param should be sufficient for all application contexts. So there's no need to set "contextInitializerClasses" in addition. Does "globalInitializerClasses" alone apply to the root context correctly, at least?
This is how we test the FrameworkServlet effect at the moment: