I haven't any mapping for several URLs for my Spring Boot App.
For example this one:
I have an ExceptionHadler:
@RestControllerAdvice(annotations = RestController.class)
public class RestExceptionHandler {
@ExceptionHandler(NotFoundException.class)
protected ResponseEntity<String> handleNotFoundException() {
return ResponseEntity.status(HttpStatus.NOT_FOUND).body(new NotFoundException().getMessage());
}
}
And I want to handle that exception in my handler. NotFound presented here is my custom exception. Which is the class/type of the Whitelabel Error, and how I can handle it like I handle my custom NFE?