I am trying to create an Aspect advisor using the aop. I need to configure it using javaConfig and NOT using xml
I have the following Aspect (taken form the Spring tutorial)
I am using javaConfig to configure all spring related Beans
public class ConcurrentOperationExecutor implements Ordered
private int order = 1;
public int getOrder()
public void setOrder(int order)
this.order = order;
public Object doConcurrentOperation(ProceedingJoinPoint pjp)
System.out.println("IN ASPECT SUCCESS!!!!!!!!!!!!!!!!!!! " + pjp.getSignature().getDeclaringTypeName() + " " + pjp.getSignature().toLongString());
but I cant get the Aspect to be configured as an Advisor.
In the xml file I have the following tag:
public ConcurrentOperationExecutor concurrentOperationExecutor()
ConcurrentOperationExecutor coe = new ConcurrentOperationExecutor();
I tried to put the configuration in the xml file this way:
but it seems that the Advisor works but doesnt catch all annotated methods. It catches some annotated methods and it misses some others.
<property name="order" value="1" />
I believe it has something to do with all the rest of the beans configured using javaconfig.
We also have a regular transaction advisor using annotations that works without problems (using @SpringAdvisor) on the bean.
Did anyone else try to use JavaConfig with Spring AOP and advisors?