Package kr.com.inspect.controller.advice
Class GlobalControllerAdvice
- java.lang.Object
-
- kr.com.inspect.controller.advice.GlobalControllerAdvice
-
@ControllerAdvice public class GlobalControllerAdvice extends java.lang.Object글로벌하게 Exception을 처리- Version:
- 1.0
- Author:
- Yeonhee Kim
-
-
Constructor Summary
Constructors Constructor Description GlobalControllerAdvice()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringhandleINTERNAL_SERVER_ERROR(javax.servlet.http.HttpServletRequest request)따로 지정한 예외 외에 발생한 예외와 관련하여 에러 메세지와 함께 error.jsp로 이동함java.lang.StringhandleNoHandlerFoundException(javax.servlet.http.HttpServletRequest request)404 에러와 관련하여 에러 메세지와 함께 error.jsp로 이동함
-
-
-
Method Detail
-
handleNoHandlerFoundException
@ExceptionHandler(org.springframework.web.servlet.NoHandlerFoundException.class) @ResponseStatus(NOT_FOUND) public java.lang.String handleNoHandlerFoundException(javax.servlet.http.HttpServletRequest request)
404 에러와 관련하여 에러 메세지와 함께 error.jsp로 이동함- Parameters:
request- 사용자의 요청- Returns:
- string 에러 페이지
-
handleINTERNAL_SERVER_ERROR
@ExceptionHandler(java.lang.Exception.class) @ResponseStatus(INTERNAL_SERVER_ERROR) public java.lang.String handleINTERNAL_SERVER_ERROR(javax.servlet.http.HttpServletRequest request)
따로 지정한 예외 외에 발생한 예외와 관련하여 에러 메세지와 함께 error.jsp로 이동함- Parameters:
request- 사용자의 요청- Returns:
- string 에러 페이지
-
-