I'm having this problem as well. I want to intercept calls on a particular implementation of a method that is defined in an interface. However unless I specify both the interface and the implementing class in the pointcut regexp. It doesn't work. Is this intentional?
Here is the my basic configuration:
Now lets say I have an interface "foo.Something" that defines a method "doSomething". Now I implement "foo.SomethingImpl which implements this interface. I want to intercept calls to SomethingImpl.doSomething. Specifying the implementation class method in the RegexpMethodPointcutAdvisor patterns does not work:
<bean id="autoProxyCreator" class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator" />
<bean id="connectionAdvice" class="foo.ConnectionAdvice"/>
<bean id="connectionAdvisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
<ref bean="connectionAdvice" />
<!-- see details below -->
Neither does specifying the interface class method:
However if I specify both, it works:
Am I missing something here?