实现HandlerInterceptor接口
重写里边的prehandler ,posthandler,afterCompletion方法
preHandle中验证是否包含配置的url,setStart(System.currentTimeMillis())初始时间 用对象保存一下
TimeThreadLocal.setTimePojo(pojo);
afterCompletion中得到end时间
TimePojo timePojo = TimeThreadLocal.getTimePojo();
执行时间=end-timePojo.getStart
原文:https://www.cnblogs.com/lyj98/p/13941877.html