diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/ComponentScan.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/ComponentScan.java index 2b0b7d011a..577ff17351 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/ComponentScan.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/ComponentScan.java @@ -128,7 +128,8 @@ public @interface ComponentScan { * Declares the type filter to be used as an {@linkplain ComponentScan#includeFilters() * include filter} or {@linkplain ComponentScan#includeFilters() exclude filter}. */ - @Retention(RetentionPolicy.SOURCE) + @Retention(RetentionPolicy.RUNTIME) + @Target({}) @interface Filter { /** * The type of filter to use.