-
Mar 11th, 2013, 03:13 AM
#1
include patterns in multiple <aop:aspectj-autoproxy/> are not merged
Hi
We had some aspectj aspects listed in include patterns in a <aop:aspectj-autoproxy/>
<aop:aspectj-autoproxy>
<aop:include name="myAspect.."/>
</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">
<property name="includePatterns">
<list merge="true">
<value>myAspect..</value>
</list>
</property>
</bean>
am I missing something?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules