Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть Spring Boot @Controlleradvice example : 2018

  • Learning and Teaching
  • 2018-10-19
  • 348
Spring Boot @Controlleradvice example : 2018
  • ok logo

Скачать Spring Boot @Controlleradvice example : 2018 бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно Spring Boot @Controlleradvice example : 2018 или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

  • Информация по загрузке:

Cкачать музыку Spring Boot @Controlleradvice example : 2018 бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео Spring Boot @Controlleradvice example : 2018

@Controlleradvice is an annotation that allows you to write a code globally using which you can utilize that for different controllers.

when I say controllers what do you mean by that? It is a common terminology used in Java. According to MVC, Controller methods are the ones
which has the logic or you can also tell they are the brains for the tasks to be performed.

So controlleradvice is accessed by different controllers written throughout the package.

By default, @ControllerAdvice will be applicable to all the classes that use the @Controller annotation. (these classes are the ones using @RestController annotation).
To be specific, there are a few properties provided that allow this.

Now, what we explained is a more generic. If we want to reduce the applicable classes down by package, we need to add the name of the package to the annotation.
It is as simple as that. When a package is chosen, it will be enabled for classes inside that package as well as sub-packages.


@ControllerAdvice("my.package")
@ControllerAdvice(value = "my.package")
@ControllerAdvice(basePackages = "my.package")

Now, using basePackageClasses property also you can mention a package. This will enable @ControllerAdvice to all controllers inside the package that the class resides.
@ControllerAdvice(basePackageClasses = Example.class)

Now, using assignableTypes you can specify like this.
@ControllerAdvice(assignableTypes = Thisisacontrollr.class)

why you should use @ControllerAdvice?

Using @ControllerAdvice along with @ExceptionHandler prevents duplication by providing global error handling so you don’t need to remember to implement them yourself or extend another class every time.
Hence it is recommended to use @controlleradvice to keep the logic centralized , and as we apply this globally, you can be tension free about whether more general exceptions are being handled or not

Thank you for watching this video

Комментарии

Информация по комментариям в разработке

Похожие видео

  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

Контакты для правообладателей [email protected]