Class ProblemHandler


  • @ControllerAdvice
    public class ProblemHandler
    extends Object
    The ProblemHandler class implements the error handler that returns errors raised by RESTful controllers as RFC 7807 JSON problem details objects.
    Author:
    Marcus Portmann
    • Constructor Detail

      • ProblemHandler

        public ProblemHandler()
    • Method Detail

      • handle

        @ExceptionHandler
        @ResponseBody
        protected org.springframework.http.ResponseEntity<ProblemDetails> handle​(javax.servlet.http.HttpServletRequest request,
                                                                                 ServiceException serviceException)
      • handle

        @ExceptionHandler
        @ResponseBody
        protected org.springframework.http.ResponseEntity<ProblemDetails> handle​(javax.servlet.http.HttpServletRequest request,
                                                                                 org.springframework.security.access.AccessDeniedException accessDeniedException)
      • handle

        @ExceptionHandler
        @ResponseBody
        protected org.springframework.http.ResponseEntity<ProblemDetails> handle​(javax.servlet.http.HttpServletRequest request,
                                                                                 Throwable cause)