Mar 11th, 2013, 03:13 AM
include patterns in multiple <aop:aspectj-autoproxy/> are not merged
We had some aspectj aspects listed in include patterns in a <aop:aspectj-autoproxy/>
Now I wanted to chain another context file that has another <aop:aspectj-autoproxy> with a different list of acpects, after adding it to the main context only the second list is managed by spring.
I looked at the way AspectJAutoProxyBeanDefinitionParser adds the include patterns and it should be merged in org.springframework.beans.MutablePropertyValues#me rgeIfRequired but the list is of type org.springframework.beans.factory.support.ManagedL ist and isMergeEnabled() for that list returns false and thus the list is not merged and the later overrides the existing.
I tried something like that instead of the <aop:aspectj-autoproxy> but had too many errors.
<bean class="org.springframework.aop.aspectj.annotation. AnnotationAwareAspectJAutoProxyCreator">
am I missing something?
Tags for this Thread