1 package tests.jfun.yan.spring; 2 3 import java.lang.reflect.Method ; 4 5 import org.springframework.aop.MethodBeforeAdvice; 6 7 public class InterceptorA implements MethodBeforeAdvice { 8 private String name; 9 10 public String getName() { 11 return name; 12 } 13 14 public void setName(String name) { 15 this.name = name; 16 } 17 18 public void before(Method method, Object [] args, Object target) 19 throws Throwable { 20 System.out.println(name + ": method "+method.getName()+" called."); 21 22 } 23 24 } 25 | Popular Tags |