package com.ld.igds.adepter;
|
|
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletResponse;
|
|
import org.springframework.web.bind.annotation.ExceptionHandler;
|
import org.springframework.web.servlet.ModelAndView;
|
|
/**
|
*
|
* @author: andy.jia
|
* @description: 会话超时拦截处理
|
* @version:
|
* @data:2019年12月9日
|
*
|
*/
|
//@ControllerAdvice
|
public class MyExceptionHandler {
|
|
|
/**
|
* 出现会话超时异常
|
* @param request
|
* @param response
|
* @param e
|
* @return
|
* @throws Exception
|
*/
|
@ExceptionHandler(value = Exception.class)
|
public Object sessionTimout(HttpServletRequest request,
|
HttpServletResponse response, Exception e) throws Exception {
|
ModelAndView mav = new ModelAndView();
|
mav.setViewName("timeout");
|
return mav;
|
}
|
|
}
|