Annotation Interface BotControllerAdvice
Marks a class as a global bot exception handler advice, applied across all
BotController beans. Analogous to Spring Web's @ControllerAdvice.
Methods annotated with
BotExceptionHandler
inside an advice class act as global fallbacks. Controller-local exception handlers
(inside BotController classes) always take priority over advice handlers for
the same exception type.
Optionally restrict which BotController beans this advice applies to using
basePackages(), assignableTypes(), or annotations(). Empty
arrays (the default) mean the advice applies globally to all controllers.
- Since:
- 0.0.2
- Author:
- Islom Mirsaburov
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<? extends Annotation>[]Restrict this advice toBotControllerbeans annotated with one of these annotations.Class<?>[]Restrict this advice toBotControllerbeans that are assignable to one of these types.String[]Restrict this advice toBotControllerbeans in these base packages.Alias for the Spring bean name of this advice component.
-
Element Details
-
value
-
basePackages
String[] basePackagesRestrict this advice toBotControllerbeans in these base packages. Empty (default) means all packages.- Default:
{}
-
assignableTypes
Class<?>[] assignableTypesRestrict this advice toBotControllerbeans that are assignable to one of these types. Empty (default) means all types.- Default:
{}
-
annotations
Class<? extends Annotation>[] annotationsRestrict this advice toBotControllerbeans annotated with one of these annotations. Empty (default) means all controllers.- Default:
{}
-