when you create a MVC project you have to define the Dispatcher-Servlet like this:
And the internal application-context like this:
My question is:
Why do we need different contexts here, one for the Dispatcher-Servlet and one for all the other beans?
How can I merge them into one? Should I?
I already tried to omit the contextConfigLocation in web.xml and use import in webmvc-config.xml instead, but this does not work.
Background of my question:
I have an applicationContext-aop.xml with common advices (tracing, logging etc) which should be used for the web-context and the internal context. I have worked around this problem by importing applicationContext-aop.xml in webmvc-config.xml, but this seems to be a bit strange because all my aop stuff is now loaded twice?