- Notifications
You must be signed in to change notification settings - Fork38.6k
Closed
Labels
Milestone
Description
QualifierAnnotationAutowireCandidateResolver.checkQualifiers()
currently checks if Java annotations are qualifier annotations, and it also checks if Java meta-annotations (for example, annotations in thejava.lang.annotation
package such as@Retention
) are qualifier annotations.
Since such annotations can never be candidates for qualifier annotations, we should preemptively skip processing of Java annotations inQualifierAnnotationAutowireCandidateResolver
.
For example, we could make use of something similar toAnnotationsScanner.hasPlainJavaAnnotationsOnly(...)
to determine if processing is necessary, or we could just exclude any annotation whose package name starts withjava.
orjavax.
.