Jun 20th, 2006, 06:46 PM
pointcut expression problem
I have an aspect with the following pointcut expression defined:
@annotation(org.lds.stack.spring.serviceproxy.Find er) || (execution(public * find*(..)) && @target(org.lds.stack.spring.serviceproxy.ServiceP roxy))
The way I read this the aspectj autoproxy should only be proxying classes who have either a @Finder on a method or a find* method with a @ServiceProxy annotation defined on the class.
However, the aspectj-autoproxy facilities are creating a proxy for beans that should not be involved in this expression like JpaTemplate for example...possibly because it has a find* method.
Any ideas why the above expression would make my JpaTemplate instance be proxied?
Jun 21st, 2006, 12:36 PM
I did a little more research it appears that @target is not working. I do an @target(org.lds.stack.spring.serviceproxy.ServiceP roxy) and it appears to proxy all my beans not just beans with a ServiceProxy annotation on the class.