连接点方法:preform()
public interface Performance {
void preform();
}
定义实现类
@Component
public class Concert implements Performance {
@Override
public void preform() {
System.out.println("表演开始");
System.out.println("表演中......");
System.out.println("表演结束");
}
}
定义切面:@Before(“execution(** com.zachary.aop.Performance.preform(…))”)
@Aspect
public class Audience {
@Before("execution(** com.zachary.aop.Performance.preform(..))")
public void silenceCellPho