Spring Boot - Exception Handling
Given this @ControllerAdvice class snippet, what will be the HTTP status code returned when a NullPointerException occurs?
@ControllerAdvice
public class GlobalExceptionHandler {
@ExceptionHandler(NullPointerException.class)
public ResponseEntity handleNullPointer(NullPointerException ex) {
return new ResponseEntity<>("Null value found", HttpStatus.BAD_REQUEST);
}
} 