クラス SystemExceptionResolver

java.lang.Object
org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver
org.springframework.web.servlet.handler.SimpleMappingExceptionResolver
org.terasoluna.gfw.web.exception.SystemExceptionResolver
すべての実装されたインタフェース:
org.springframework.core.Ordered, org.springframework.web.servlet.HandlerExceptionResolver

public class SystemExceptionResolver extends org.springframework.web.servlet.handler.SimpleMappingExceptionResolver
Class that performs exception handling.
  • フィールドの概要

    クラスから継承されたフィールド org.springframework.web.servlet.handler.SimpleMappingExceptionResolver

    DEFAULT_EXCEPTION_ATTRIBUTE

    クラスから継承されたフィールド org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver

    logger

    インタフェースから継承されたフィールド org.springframework.core.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • コンストラクタの概要

    コンストラクタ
    コンストラクタ
    説明
     
  • メソッドの概要

    修飾子とタイプ
    メソッド
    説明
    protected org.springframework.web.servlet.ModelAndView
    doResolveException(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler, Exception ex)
    Performs exception handling.
    protected void
    setExceptionCode(Exception ex, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
    Sets exception code in HttpServletRequest and HttpServletResponse header.
    void
    setExceptionCodeAttribute(String exceptionCodeAttribute)
    Sets the value for exception Code Attribute name.
    void
    setExceptionCodeHeader(String exceptionCodeHeader)
    Sets the header name to set exception code in the response header.
    void
    Sets the object for resolving exception code.
    protected void
    setExceptionInfo(Exception ex, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
    Sets the exception information
    protected void
    setResultMessages(Exception ex, jakarta.servlet.http.HttpServletRequest request)
    Sets result message
    void
    setResultMessagesAttribute(String resultMessagesAttribute)
    Sets the attribute name used for storing result message in request scope and FlashMap.

    クラスから継承されたメソッド org.springframework.web.servlet.handler.SimpleMappingExceptionResolver

    addStatusCode, applyStatusCodeIfPossible, determineStatusCode, determineViewName, findMatchingViewName, getDepth, getModelAndView, getModelAndView, getStatusCodesAsMap, setDefaultErrorView, setDefaultStatusCode, setExceptionAttribute, setExceptionMappings, setExcludedExceptions, setStatusCodes

    クラスから継承されたメソッド org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver

    addMappedHandlerClass, buildLogMessage, getMappedHandlerClasses, getOrder, hasHandlerMappings, logException, prepareResponse, preventCaching, resolveException, setMappedHandlerClasses, setMappedHandlerPredicate, setMappedHandlers, setOrder, setPreventResponseCaching, setWarnLogCategory, shouldApplyTo

    クラスから継承されたメソッド java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • コンストラクタの詳細

    • SystemExceptionResolver

      public SystemExceptionResolver()
  • メソッドの詳細

    • setExceptionCodeAttribute

      public void setExceptionCodeAttribute(String exceptionCodeAttribute)
      Sets the value for exception Code Attribute name.

      This value is used as the attribute name to set exception code in request scope and FlashMap. Calling this method overwrites the default value "exceptionCode".
      If null or blank or space is set, then exception code will not be set in request scope and FlashMap when setExceptionCode(Exception, HttpServletRequest, HttpServletResponse) is called.

      パラメータ:
      exceptionCodeAttribute - Attribute name of the exception code to be set in request scope and FlashMap.
    • setExceptionCodeHeader

      public void setExceptionCodeHeader(String exceptionCodeHeader)
      Sets the header name to set exception code in the response header.

      Calling this method overwrites the default value "X-Exception-Code".
      If null or blank or space is set, then exception code will not be set in the response header when setExceptionCode(Exception, HttpServletRequest, HttpServletResponse) is called..

      パラメータ:
      exceptionCodeHeader - Attribute name of the exception code to be set in the response header.
    • setResultMessagesAttribute

      public void setResultMessagesAttribute(String resultMessagesAttribute)
      Sets the attribute name used for storing result message in request scope and FlashMap.

      Calling this method overwrites the default value "resultMessages".
      If null or blank or space is set, then ResultMessages will not be set in request scope and FlashMap when setResultMessages(Exception, HttpServletRequest) is called.

      パラメータ:
      resultMessagesAttribute - Attribute name used for storing result message in request scope and FlashMap.
    • setExceptionCodeResolver

      public void setExceptionCodeResolver(ExceptionCodeResolver exceptionCodeResolver)
      Sets the object for resolving exception code.

      If not set, exception code will not be set in request scope and response header when setExceptionCode(Exception, HttpServletRequest, HttpServletResponse) is called.

      パラメータ:
      exceptionCodeResolver - Exception code resolution object.
    • doResolveException

      protected org.springframework.web.servlet.ModelAndView doResolveException(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler, Exception ex)
      Performs exception handling.

      Decides the View and resolves the Model necessary for display of View.

      オーバーライド:
      doResolveException クラス内 org.springframework.web.servlet.handler.SimpleMappingExceptionResolver
      パラメータ:
      request - HttpServletRequest
      response - HttpServletResponse
      handler - Request handler
      ex - Exception
      関連項目:
      • SimpleMappingExceptionResolver.doResolveException(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.Object, java.lang.Exception)
    • setExceptionInfo

      protected void setExceptionInfo(Exception ex, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
      Sets the exception information

      Sets exception information in HttpServletRequest and HttpServletResponse.

      パラメータ:
      ex - Exception
      request - HttpServletRequest
      response - HttpServletResponse
    • setExceptionCode

      protected void setExceptionCode(Exception ex, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
      Sets exception code in HttpServletRequest and HttpServletResponse header.

      Sets exception code in HttpServletRequest and HttpServletResponse header. If exceptionCodeAttribute is null or blank or space is set, then exception code is not set.

      パラメータ:
      ex - Exception
      request - HttpServletRequest
      response - HttpServletResponse
    • setResultMessages

      protected void setResultMessages(Exception ex, jakarta.servlet.http.HttpServletRequest request)
      Sets result message

      Sets result message in HttpServletRequest(FlashMap)

      パラメータ:
      ex - Exception
      request - HttpServletRequest