Class GlobalControllerAdvice


  • @ControllerAdvice
    public class GlobalControllerAdvice
    extends java.lang.Object
    글로벌하게 Exception을 처리
    Version:
    1.0
    Author:
    Yeonhee Kim
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String handleINTERNAL_SERVER_ERROR​(javax.servlet.http.HttpServletRequest request)
      따로 지정한 예외 외에 발생한 예외와 관련하여 에러 메세지와 함께 error.jsp로 이동함
      java.lang.String handleNoHandlerFoundException​(javax.servlet.http.HttpServletRequest request)
      404 에러와 관련하여 에러 메세지와 함께 error.jsp로 이동함
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GlobalControllerAdvice

        public GlobalControllerAdvice()
    • 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 에러 페이지