前三篇Spring IOC的源码解析与这一章的AOP是紧密相连的:
首先介绍我们本章的demo:
一个接口,一个实现,一个切面,一个测试类。
public interface TestInterface {
void hello();
}
@Component
public class TestImpl implements TestInterface {
@Override
public void hello() {
System.out.println("hello,world!");
}
}