➋
public boolean preHandle(HttpServletRequest request,
HttpServletResponse response,
Object handler) throws Exception {
StopWatch stopWatch = new StopWatch(handler.toString());
stopWatch.start(handler.toString());
stopWatchLocal.set(stopWatch);
logger.info("접근한 URL 경로 : " + getURLPath(request)); ➌
logger.info("요청 처리 시작 시각 : " + getCurrentTime()); ➍
return true;
}
public void postHandle(HttpServletRequest arg0,
HttpServletResponse response,
Object handler,
➎
ModelAndView modelAndView) throws Exception {
logger.info("요청 처리 종료 시각 : " + getCurrentTime()); ➏
}
public void afterCompletion(HttpServletRequest request,
HttpServletResponse response,
Object handler,
➐
Exception exception) throws Exception {
StopWatch stopWatch = stopWatchLocal.get();
stopWatch.stop();
logger.info("요청 처리 소요 시간 : " + stopWatch.getTotalTimeMillis() + " ms"); ➑
stopWatchLocal.set(null);
logger.info("=========================================="); ➒
}