Class ExceptionHandleClass

java.lang.Object
org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler
com.skava.ratingandreviews.exceptions.ExceptionHandleClass
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.MessageSourceAware

@ControllerAdvice public class ExceptionHandleClass extends org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler

ExceptionHandlingClass

This class provides the exception required for the creation response message

  • Field Summary

    Fields inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler

    logger, PAGE_NOT_FOUND_LOG_CATEGORY, pageNotFoundLogger
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    ExceptionHandleClass(org.springframework.context.MessageSource messageSource)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.http.ResponseEntity<Object>
    handleServiceException(com.skava.core.ECommerceException exception, org.springframework.web.context.request.WebRequest request)
    This method creates ResponseEntity.

    Methods inherited from class org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExceptionHandler

    createProblemDetail, createResponseEntity, getMessageSource, handleAsyncRequestNotUsableException, handleAsyncRequestTimeoutException, handleConversionNotSupported, handleErrorResponseException, handleException, handleExceptionInternal, handleHandlerMethodValidationException, handleHttpMediaTypeNotAcceptable, handleHttpMediaTypeNotSupported, handleHttpMessageNotReadable, handleHttpMessageNotWritable, handleHttpRequestMethodNotSupported, handleMaxUploadSizeExceededException, handleMethodArgumentNotValid, handleMethodValidationException, handleMissingPathVariable, handleMissingServletRequestParameter, handleMissingServletRequestPart, handleNoHandlerFoundException, handleNoResourceFoundException, handleServletRequestBindingException, handleTypeMismatch, setMessageSource

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExceptionHandleClass

      @Autowired public ExceptionHandleClass(org.springframework.context.MessageSource messageSource)
    • ExceptionHandleClass

      public ExceptionHandleClass()
  • Method Details

    • handleServiceException

      @ExceptionHandler(com.skava.core.ECommerceException.class) public org.springframework.http.ResponseEntity<Object> handleServiceException(com.skava.core.ECommerceException exception, org.springframework.web.context.request.WebRequest request)
      This method creates ResponseEntity.
      Parameters:
      exception - Contains the exception required for the creation of response message.
      request - Contains the attributes required for the creation of response message.
      Returns:
      Returns the instance of ResponseEntity