Class BaseResourceExceptionHandler
java.lang.Object
com.eoscode.springapitools.resource.exception.BaseResourceExceptionHandler
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<StandardError>authorization(AuthorizationException e, jakarta.servlet.http.HttpServletRequest request) org.springframework.http.ResponseEntity<StandardError>constraintViolation(jakarta.validation.ConstraintViolationException e) org.springframework.http.ResponseEntity<StandardError>dataIntegrityViolationException(org.springframework.dao.DataIntegrityViolationException e) protected StringgetPath()protected URIorg.springframework.http.ResponseEntity<StandardError>mappingStructureValidation(MappingStructureValidationException e, jakarta.servlet.http.HttpServletRequest request) org.springframework.http.ResponseEntity<StandardError>methodNotAllowed(MethodNotAllowedException e, jakarta.servlet.http.HttpServletRequest request) org.springframework.http.ResponseEntity<StandardError>objectNotFound(EntityNotFoundException e, jakarta.servlet.http.HttpServletRequest request) org.springframework.http.ResponseEntity<StandardError>objectNotFound(org.springframework.security.core.AuthenticationException e, jakarta.servlet.http.HttpServletRequest request) org.springframework.http.ResponseEntity<StandardError>resourceMethodNotAllowed(ResourceMethodNotAllowedException e, jakarta.servlet.http.HttpServletRequest request) org.springframework.http.ResponseEntity<StandardError>searchException(SearchException e, jakarta.servlet.http.HttpServletRequest request) org.springframework.http.ResponseEntity<StandardError>validation(ValidationException e, jakarta.servlet.http.HttpServletRequest request) org.springframework.http.ResponseEntity<StandardError>validation(org.springframework.web.bind.MethodArgumentNotValidException e, jakarta.servlet.http.HttpServletRequest request)
-
Field Details
-
LOG
protected final org.apache.commons.logging.Log LOG
-
-
Constructor Details
-
BaseResourceExceptionHandler
public BaseResourceExceptionHandler()
-
-
Method Details
-
getPathURI
-
getPath
-
objectNotFound
@ExceptionHandler(EntityNotFoundException.class) public org.springframework.http.ResponseEntity<StandardError> objectNotFound(EntityNotFoundException e, jakarta.servlet.http.HttpServletRequest request) -
validation
@ExceptionHandler(org.springframework.web.bind.MethodArgumentNotValidException.class) public org.springframework.http.ResponseEntity<StandardError> validation(org.springframework.web.bind.MethodArgumentNotValidException e, jakarta.servlet.http.HttpServletRequest request) -
constraintViolation
@ExceptionHandler(jakarta.validation.ConstraintViolationException.class) public org.springframework.http.ResponseEntity<StandardError> constraintViolation(jakarta.validation.ConstraintViolationException e) -
dataIntegrityViolationException
@ExceptionHandler(org.springframework.dao.DataIntegrityViolationException.class) public org.springframework.http.ResponseEntity<StandardError> dataIntegrityViolationException(org.springframework.dao.DataIntegrityViolationException e) -
validation
@ExceptionHandler(ValidationException.class) public org.springframework.http.ResponseEntity<StandardError> validation(ValidationException e, jakarta.servlet.http.HttpServletRequest request) -
searchException
@ExceptionHandler(SearchException.class) public org.springframework.http.ResponseEntity<StandardError> searchException(SearchException e, jakarta.servlet.http.HttpServletRequest request) -
authorization
@ExceptionHandler(AuthorizationException.class) public org.springframework.http.ResponseEntity<StandardError> authorization(AuthorizationException e, jakarta.servlet.http.HttpServletRequest request) -
objectNotFound
@ExceptionHandler({org.springframework.security.core.userdetails.UsernameNotFoundException.class,org.springframework.security.core.AuthenticationException.class}) public org.springframework.http.ResponseEntity<StandardError> objectNotFound(org.springframework.security.core.AuthenticationException e, jakarta.servlet.http.HttpServletRequest request) -
methodNotAllowed
@ExceptionHandler(MethodNotAllowedException.class) public org.springframework.http.ResponseEntity<StandardError> methodNotAllowed(MethodNotAllowedException e, jakarta.servlet.http.HttpServletRequest request) -
resourceMethodNotAllowed
@ExceptionHandler(ResourceMethodNotAllowedException.class) public org.springframework.http.ResponseEntity<StandardError> resourceMethodNotAllowed(ResourceMethodNotAllowedException e, jakarta.servlet.http.HttpServletRequest request) -
mappingStructureValidation
@ExceptionHandler(MappingStructureValidationException.class) public org.springframework.http.ResponseEntity<StandardError> mappingStructureValidation(MappingStructureValidationException e, jakarta.servlet.http.HttpServletRequest request)
-