Hi Alls,
I have 3 methods in my class
in spring config there're such lines:Code:public void startRuleSet() { System.out.println("Start Rule Set"); makeRule1(); makeRule2(); } public void makeRule1() { System.out.println("Rule 1"); } public void makeRule2() { System.out.println("Rule 2"); }
And when i call startRuleSetCode:<bean id="myBefore" class="com.my.test.aop.MyBefore"/> <bean id="ruleSetAOPTest" class="com.my.test.aop.RuleSetAOPImpl"/> <bean id="ruleAdvisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor"> <property name="advice"> <ref local="myBefore"/> </property> <property name="pattern"> <value>.*Rule.*</value> </property> </bean> <bean id="ruleSetBean" class="org.springframework.aop.framework.ProxyFactoryBean"> <property name="target"> <ref local="ruleSetAOPTest"/> </property> <property name="proxyTargetClass"> <value>true</value> </property> <property name="interceptorNames"> <list> <value>ruleAdvisor</value> </list> </property> </bean>
I have advice invoke only on startRuleSet(), but i want that advice is invoked on makeRule* methods which are invoked inside startRuleSet method.Code:final RuleSetAOPImpl ruleSet = (RuleSetAOPImpl) context.getContext().getBean("ruleSetBean"); ruleSet.startRuleSet();
Is it possible ?
Thank's


Reply With Quote
