- public interface IDog1 {
- public void dog();
- public void run();
- }
- public class MyAfter implements AfterReturningAdvice {
- public void afterReturning(Object o, Method method, Object[] objects, Object o1) throws Throwable {
- System.out.println("=====after===");
- }
- }
- public class Dog1 implements IDog1 {
- public void dog(){
- System.out.println("===测试顾问==1dog()");
- }
- public void run() {
- System.out.println("====测试顾问===2run()");
- }
- }
- public class MyBefore1 implements MethodBeforeAdvice {
- public void before(Method method, Object[] objects, Object o) throws Throwable {
- System.out.println("======before====");
- }
- }