|
|
|
@ -168,13 +168,10 @@ public class ClassPathScanningCandidateComponentProvider implements ResourceLoad |
|
|
|
@SuppressWarnings("unchecked") |
|
|
|
@SuppressWarnings("unchecked") |
|
|
|
protected void registerDefaultFilters() { |
|
|
|
protected void registerDefaultFilters() { |
|
|
|
this.includeFilters.add(new AnnotationTypeFilter(Component.class)); |
|
|
|
this.includeFilters.add(new AnnotationTypeFilter(Component.class)); |
|
|
|
this.includeFilters.add(new AnnotationTypeFilter(Scope.class)); |
|
|
|
|
|
|
|
ClassLoader cl = ClassPathScanningCandidateComponentProvider.class.getClassLoader(); |
|
|
|
ClassLoader cl = ClassPathScanningCandidateComponentProvider.class.getClassLoader(); |
|
|
|
try { |
|
|
|
try { |
|
|
|
this.includeFilters.add(new AnnotationTypeFilter( |
|
|
|
this.includeFilters.add(new AnnotationTypeFilter( |
|
|
|
((Class<? extends Annotation>) cl.loadClass("javax.inject.Named")))); |
|
|
|
((Class<? extends Annotation>) cl.loadClass("javax.inject.Named")))); |
|
|
|
this.includeFilters.add(new AnnotationTypeFilter( |
|
|
|
|
|
|
|
((Class<? extends Annotation>) cl.loadClass("javax.inject.Scope")))); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
catch (ClassNotFoundException ex) { |
|
|
|
catch (ClassNotFoundException ex) { |
|
|
|
// JSR-330 API not available - simply skip.
|
|
|
|
// JSR-330 API not available - simply skip.
|
|
|
|
|