Announcement Announcement Module
No announcement yet.
include patterns in multiple <aop:aspectj-autoproxy/> are not merged Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • include patterns in multiple <aop:aspectj-autoproxy/> are not merged

    We had some aspectj aspects listed in include patterns in a <aop:aspectj-autoproxy/>
    <aop:include name="myAspect.."/>

    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 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">

    am I missing something?