Spring Boot REST API Global Exception Handling | @ExceptionHandler | @ControllerAdvice

Поделиться
HTML-код
  • Опубликовано: 26 июн 2024
  • In this session, i explained about springboot default exception handling overview and global exception handling and how to define custom exceptions with custom error response , kindly go through it and practice well
    for trainings contact
    8500122392
    javajungle

Комментарии • 2

  • @SunnyKumar-ud9gp
    @SunnyKumar-ud9gp 11 дней назад +1

    After intoducing globalHandler exception , any place exception happens, Global class will be called from there?

    • @javajungle
      @javajungle  8 дней назад

      exactly @ControllerAdvice is taking care that is why we should annotate global exception handling class with this annotation, @ControllerAdvice is a specialized version of the @Component annotation that allows you to handle exceptions globally, apply model attributes to multiple controllers, and bind methods for multiple controllers in a single place.