Announcement Announcement Module
Collapse
No announcement yet.
Advisor and target beans must be in the same file? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Advisor and target beans must be in the same file?

    I am using Spring's DefaultAdvisorAutoProxyCreator to
    make an advisor, called myAdvisor, advise some beans
    defined in a file called applicationContext-1.xml.
    I also have another context file in the same application,
    applicationContext-2.xml.

    I discovered that I have to put myAdvisor's bean definition
    and the bean definition for DefaultAdvisorAutoProxyCreator
    in applicationContext-1.xml in order for it to work.
    If I put the two's definitions in applicationContext-2.xml,
    then those target beans in applicationContext-1.xml would
    not get advised.

    Is this true? Or my understanding is wrong? If my understanding
    is correct, then where can I find such information?
    I dont recall spring reference doc has such info.

    Regards,
    Pete
Working...
X