From ff9a34927133059bef680c26f85129a1021513e9 Mon Sep 17 00:00:00 2001 From: Sam Brannen <104798+sbrannen@users.noreply.github.com> Date: Tue, 7 Oct 2025 12:37:07 +0200 Subject: [PATCH] Introduce findAnnotatedBeans(ListableBeanFactory) in ControllerAdviceBean This commit introduces a new findAnnotatedBeans(ListableBeanFactory) override for the existing findAnnotatedBeans(ApplicationContext) method. Closes gh-35571 --- .../web/method/ControllerAdviceBean.java | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/spring-web/src/main/java/org/springframework/web/method/ControllerAdviceBean.java b/spring-web/src/main/java/org/springframework/web/method/ControllerAdviceBean.java index 9a47c295a1..9c30cb0fcf 100644 --- a/spring-web/src/main/java/org/springframework/web/method/ControllerAdviceBean.java +++ b/spring-web/src/main/java/org/springframework/web/method/ControllerAdviceBean.java @@ -228,14 +228,26 @@ public class ControllerAdviceBean implements Ordered { * instances. *
Note that the {@code ControllerAdviceBean} instances in the returned list
* are sorted using {@link OrderComparator#sort(List)}.
+ * @see #findAnnotatedBeans(ListableBeanFactory)
+ */
+ public static List Note that the {@code ControllerAdviceBean} instances in the returned list
+ * are sorted using {@link OrderComparator#sort(List)}.
+ * @since 7.0
* @see #getOrder()
* @see OrderComparator
* @see Ordered
*/
- public static List