Annotation Type ControllerAdvice
A bean whose ExceptionHandler methods apply to every controller.
Several are asked in Order order, the unordered ones last by bean name, and
only after the failing controller's own handlers declined. The build writes
the dispatch to each handler as code; nothing is found by reflection.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionString[]Limits the advice to controllers in these packages and their subpackages; empty for every controller.The bean name; empty for the default.
-
Element Details
-
value
-
basePackages
String[] basePackagesLimits the advice to controllers in these packages and their subpackages; empty for every controller.- Default:
{}
-