springboot自动装配

springboot自动装配_第1张图片

springboot自动装配_第2张图片 

 

@Override
    public String[] selectImports(AnnotationMetadata annotationMetadata) {
         if (!isEnabled(annotationMetadata)) {
             return NO_IMPORTS;
         }

springboot自动装配_第3张图片 

 

 

@Override
    public String[] selectImports(AnnotationMetadata annotationMetadata) {
         if (!isEnabled(annotationMetadata)) {
             return NO_IMPORTS;
         }
         try {
             AutoConfigurationMetadata autoConfigurationMetadata = AutoConfigurationMetadataLoader
                      .loadMetadata(this.beanClassLoader);
             AnnotationAttributes attributes = getAttributes(annotationMetadata);
             List configurations = getCandidateConfigurations(annotationMetadata,
                      attributes);
             configurations = removeDuplicates(configurations);
             configurations = sort(configurations, autoConfigurationMetadata);
             Set exclusions = getExclusions(annotationMetadata, attributes);
             checkExcludedClasses(configurations, exclusions);
             configurations.removeAll(exclusions);
             configurations = filter(configurations, autoConfigurationMetadata);
             fireAutoConfigurationImportEvents(configurations, exclusions);
             return configurations.toArray(new String[configurations.size()]);
         }

 

 

 

 

springboot自动装配_第4张图片 

 

 

springboot自动装配_第5张图片

 

 

 

你可能感兴趣的:(java,spring,boot)