📄 actiontimerinterceptor.java
字号:
package com.vegeta.interceptor;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;
public class ActionTimerInterceptor implements Interceptor {
/**
*
*/
private static final long serialVersionUID = 1L;
public String intercept(ActionInvocation invocation) throws Exception {
long t1 = System.currentTimeMillis();
String target = invocation.invoke();
long t2 = System.currentTimeMillis();
System.out.println("Action " + invocation.getAction().getClass().getName() + " took " + (t2 - t1) + " millisecs");
return target;
}
public void init() {
}
public void destroy() {
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -