Spring Boot - Exception Handling
How do you define a method inside a
@ControllerAdvice class to handle IllegalStateException globally?@ControllerAdvice class to handle IllegalStateException globally?@ControllerAdvice class, the method must be annotated with @ExceptionHandler specifying the exception type.IllegalStateException.class, as the value to @ExceptionHandler to target that exception.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions