registermethodinterceptor.java

来自「加拿大达内科技有限公司配需java程序员的上课时的代码」· Java 代码 · 共 19 行

JAVA
19
字号
package aop3;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

public class RegisterMethodInterceptor implements MethodInterceptor{

	public Object invoke(MethodInvocation arg0) throws Throwable {
		// TODO Auto-generated method stub
		System.out.println(new java.util.Date());
		System.out.println("welcome to use bye!");
		Object rst = arg0.proceed();
		System.out.println(new java.util.Date());
		System.out.println("welcome to use bye!");
		return arg0;
	}

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?