I tried 2 different ways of implementing an exception handler for MethodArgumentNotValidException :
MethodArgumentNotValidException
First one using ResponseEntity:
ResponseEntity