Removed unused fields from ConfigurationClassBeanDefinitionReader
Issue: SPR-11740 Issue: SPR-13280
This commit is contained in:
@@ -35,7 +35,6 @@ import org.springframework.beans.factory.annotation.RequiredAnnotationBeanPostPr
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.beans.factory.config.BeanDefinitionHolder;
|
||||
import org.springframework.beans.factory.groovy.GroovyBeanDefinitionReader;
|
||||
import org.springframework.beans.factory.parsing.ProblemReporter;
|
||||
import org.springframework.beans.factory.parsing.SourceExtractor;
|
||||
import org.springframework.beans.factory.support.AbstractBeanDefinitionReader;
|
||||
import org.springframework.beans.factory.support.BeanDefinitionReader;
|
||||
@@ -51,7 +50,6 @@ import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.ResourceLoader;
|
||||
import org.springframework.core.type.AnnotationMetadata;
|
||||
import org.springframework.core.type.MethodMetadata;
|
||||
import org.springframework.core.type.classreading.MetadataReaderFactory;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
@@ -79,10 +77,6 @@ class ConfigurationClassBeanDefinitionReader {
|
||||
|
||||
private final SourceExtractor sourceExtractor;
|
||||
|
||||
private final ProblemReporter problemReporter;
|
||||
|
||||
private final MetadataReaderFactory metadataReaderFactory;
|
||||
|
||||
private final ResourceLoader resourceLoader;
|
||||
|
||||
private final Environment environment;
|
||||
@@ -99,14 +93,11 @@ class ConfigurationClassBeanDefinitionReader {
|
||||
* to populate the given {@link BeanDefinitionRegistry}.
|
||||
*/
|
||||
ConfigurationClassBeanDefinitionReader(BeanDefinitionRegistry registry, SourceExtractor sourceExtractor,
|
||||
ProblemReporter problemReporter, MetadataReaderFactory metadataReaderFactory,
|
||||
ResourceLoader resourceLoader, Environment environment, BeanNameGenerator importBeanNameGenerator,
|
||||
ImportRegistry importRegistry) {
|
||||
|
||||
this.registry = registry;
|
||||
this.sourceExtractor = sourceExtractor;
|
||||
this.problemReporter = problemReporter;
|
||||
this.metadataReaderFactory = metadataReaderFactory;
|
||||
this.resourceLoader = resourceLoader;
|
||||
this.environment = environment;
|
||||
this.importBeanNameGenerator = importBeanNameGenerator;
|
||||
@@ -243,8 +234,6 @@ class ConfigurationClassBeanDefinitionReader {
|
||||
|
||||
// Consider scoping
|
||||
ScopedProxyMode proxyMode = ScopedProxyMode.NO;
|
||||
// TODO [SPR-13280] Determine why type is hard coded to org.springframework.context.annotation.Scope,
|
||||
// since AnnotationScopeMetadataResolver supports a custom scope annotation type.
|
||||
AnnotationAttributes attributes = AnnotationConfigUtils.attributesFor(metadata, Scope.class);
|
||||
if (attributes != null) {
|
||||
beanDef.setScope(attributes.getAliasedString("value", Scope.class, configClass.getResource()));
|
||||
|
||||
@@ -326,8 +326,8 @@ public class ConfigurationClassPostProcessor implements BeanDefinitionRegistryPo
|
||||
|
||||
// Read the model and create bean definitions based on its content
|
||||
if (this.reader == null) {
|
||||
this.reader = new ConfigurationClassBeanDefinitionReader(registry, this.sourceExtractor,
|
||||
this.problemReporter, this.metadataReaderFactory, this.resourceLoader, this.environment,
|
||||
this.reader = new ConfigurationClassBeanDefinitionReader(
|
||||
registry, this.sourceExtractor, this.resourceLoader, this.environment,
|
||||
this.importBeanNameGenerator, parser.getImportRegistry());
|
||||
}
|
||||
this.reader.loadBeanDefinitions(configClasses);
|
||||
|
||||
Reference in New Issue
Block a user