I have a project consisting of two subprojects which are both Spring projects and have an applicationContext.xml each.
One is a framework project (which ends up as
In Spring MVC webapps, you actually have 2 contexts: the root context and the servlet's context. Be sure to configure your aspect in the servlet's context. Indeed, the servlet's context "sees" the root one - and not the other way around:
In the Web MVC framework, each DispatcherServlet has its own WebApplicationContext, which inherits all the beans already defined in the root WebApplicationContext. These inherited beans can be overridden in the servlet-specific scope, and you can define new scope-specific beans local to a given Servlet instance.
So your import of the framework config has to be made in the [servlet-name]-servlet.xml
file rather than in the other one(s) if you want your aspects to be applied to its beans.