AspectJ切点函数 target()的this()问题,在引介增强类时无法织入增强

配置:
aop:aspectj-autoproxy/


接口:

public interface Waiter {

public void greetTo(String clientName);
public void serveTo(String clientName);

}

public interface Seller {
int sell(String goods, String clientName);
}

实现类:
public class NaiveWaiter implements Waiter {
@Override
public void greetTo(String clientName) {
System.out.println("NaiveWaiter:greet To " + clientName + "...");
}
@Override
public void serveTo(String clientName) {
System.out.println("NaiveWaiter:serving " + clientName + "...");
}
}

public class SmartSeller implements Seller {

public int sell(String goods,String clientName) {
    System.out.println("SmartSeller: sell "+goods +" to "+clientName+"...");
    return 100;
}

}

增强切面:
@Aspect
public class EnableSellerAspect {
@DeclareParents(value = "com.NaiveWaiter", defaultImpl = SmartSeller.class)
public Seller seller;
}

@Aspect
public class TestAspect {
@AfterReturning("this(com.Seller)")
public void thisTest(){
System.out.println("thisTest() exectued!!!");
}
}

如果没有其他的失误,使用@DeclareParents Seller的方法要想被加强
欠缺的是指定织入顺序
https://blog.csdn.net/yangshangwei/article/details/77861658