package com.spring.dao; import org.springframework.stereotype.Component; @Component("userDAO") public class UserDao { public void say() { System.out.println("say method is called"); } public void smile() { System.out.println("smile method is called"
1 要执行的普通方法
package com.zxf.demo;
public class Demo1 {
public void d1(){
System.out.println("d1()方法。。。。");
}
}
2 定义环绕通知的相关类
package com.zxf.advice;
import org.aspectj.lang.ProceedingJoinPoint;
public class MyAdvice {
public voi