Announcement Announcement Module
Collapse
No announcement yet.
regard DefaultAdvisorAutoProxyCreator Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • regard DefaultAdvisorAutoProxyCreator

    when i wanna use abstractPointCutAdvisor here, i need to include a advisor inside this abstract class. I want the class only run on ot subclass but not i had run the "welcomeAdvice" twice (one in subclass, one in super class) , but if i ommitted the advice property in abstract class, i will become an error (the programmer cannot run , some exception is throw).

    any idea ?

    <bean class="org.springframework.aop.framework.autoproxy .DefaultAdvisorAutoProxyCreator"/>

    <bean id = "abstractAdvisorPointCut" class = "org.springframework.aop.support.NameMatchMethodPo intcutAdvisor" lazy-init="true">
    <property name = "mappedNames">
    <list>
    <value>buyCar</value>
    <!-- <value>intro</value>-->
    </list>
    </property>

    <!-- cannot omit this, else the program cannot run-->
    <!--I wanna omit this element (if not will run welcomeAdvice twice one here , one subclass) -->
    <property name = "advice" >
    <ref bean = "welcomeAdvice"/>
    </property>

    </bean>

    <bean id = "welocmeAdvisorPointCut" parent = "abstractAdvisorPointCut">
    <property name = "advice" >
    <ref bean = "welcomeAdvice"/>
    </property>
    </bean>

    <bean id = "thankAdvisorPointCut" parent = "abstractAdvisorPointCut">
    <property name = "advice" >
    <ref bean = "thankAdvice"/>
    </property>
    </bean>
    Last edited by kiwi; Sep 21st, 2006, 09:44 PM.
Working...
X