diff --git a/spring-web/src/main/java/org/springframework/web/bind/annotation/ControllerAdvice.java b/spring-web/src/main/java/org/springframework/web/bind/annotation/ControllerAdvice.java index db1f6c6e4cfc1289b6ad13c48c97222c681eb86a..5de9100019895d1a275acabce40109d3cbb3acfe 100644 --- a/spring-web/src/main/java/org/springframework/web/bind/annotation/ControllerAdvice.java +++ b/spring-web/src/main/java/org/springframework/web/bind/annotation/ControllerAdvice.java @@ -32,12 +32,15 @@ import org.springframework.stereotype.Component; * {@link ModelAttribute @ModelAttribute} methods to be shared across * multiple {@code @Controller} classes. * - *

Classes with {@code @ControllerAdvice} can be declared explicitly as Spring - * beans or auto-detected via classpath scanning. All such beans are sorted based - * on {@link org.springframework.core.Ordered Ordered}, - * {@link org.springframework.core.annotation.Order @Order}, and - * {@link javax.annotation.Priority @Priority} (in that order of precedence), - * and applied in that order at runtime. For handling exceptions, an + *

Classes annotated with {@code @ControllerAdvice} can be declared explicitly + * as Spring beans or auto-detected via classpath scanning. All such beans are + * sorted based on {@link org.springframework.core.Ordered Ordered} / + * {@link org.springframework.core.PriorityOrdered PriorityOrdered} semantics or + * {@link org.springframework.core.annotation.Order @Order} / + * {@link javax.annotation.Priority @Priority} declarations, with {@code Ordered} / + * {@code PriorityOrdered} semantics taking precedence over {@code @Order} / + * {@code @Priority} declarations. {@code @ControllerAdvice} beans are then + * applied in that order at runtime. For handling exceptions, an * {@code @ExceptionHandler} will be picked on the first advice with a matching * exception handler method. For model attributes and {@code InitBinder} * initialization, {@code @ModelAttribute} and {@code @InitBinder} methods will