Package com.skava.marketplace.util
Class RestExceptionHandler
java.lang.Object
com.skava.marketplace.util.RestExceptionHandler
Class for handling ConstraintViolationException
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.http.ResponseEntity<Object>
handleConstraintViolationException
(jakarta.validation.ConstraintViolationException constraintViolations, jakarta.servlet.http.HttpServletRequest request) handleConstraintViolationException function used to handle
-
Constructor Details
-
RestExceptionHandler
public RestExceptionHandler()
-
-
Method Details
-
handleConstraintViolationException
@ExceptionHandler(jakarta.validation.ConstraintViolationException.class) protected org.springframework.http.ResponseEntity<Object> handleConstraintViolationException(jakarta.validation.ConstraintViolationException constraintViolations, jakarta.servlet.http.HttpServletRequest request) handleConstraintViolationException function used to handle- Parameters:
constraintViolations
- ConstraintViolationException.request
- http servlet request- Returns:
- ResponseEntity Object
-