From 63fd4dae1ea8b2773609769e1560c9fe8d6a6c20 Mon Sep 17 00:00:00 2001 From: Uri Simchoni Date: Sun, 10 May 2020 21:22:26 +0300 Subject: [PATCH] javadoc: remove the comment that says a concrete method is required for @Lookup method Spring can dynamically override an abstract @Lookup-annotated method to create a concrete class backing a bean, and this works with beans defined by @Component annotation. --- .../org/springframework/beans/factory/annotation/Lookup.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/Lookup.java b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/Lookup.java index 495354aa20c6..2fdd330f4bad 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/annotation/Lookup.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/annotation/Lookup.java @@ -42,9 +42,7 @@ * from factory methods where we cannot dynamically provide a subclass for them. * *

Concrete limitations in typical Spring configuration scenarios: - * When used with component scanning or any other mechanism that filters out abstract - * beans, provide stub implementations of your lookup methods to be able to declare - * them as concrete classes. And please remember that lookup methods won't work on + * Please remember that lookup methods won't work on * beans returned from {@code @Bean} methods in configuration classes; you'll have * to resort to {@code @Inject Provider} or the like instead. *