Create ScannedGenericBeanDefinitions for index-derived components as well
Closes gh-24638
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,7 +29,6 @@ import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.beans.factory.BeanDefinitionStoreException;
|
||||
import org.springframework.beans.factory.annotation.AnnotatedBeanDefinition;
|
||||
import org.springframework.beans.factory.annotation.AnnotatedGenericBeanDefinition;
|
||||
import org.springframework.beans.factory.annotation.Lookup;
|
||||
import org.springframework.beans.factory.config.BeanDefinition;
|
||||
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
|
||||
@@ -386,8 +385,7 @@ public class ClassPathScanningCandidateComponentProvider implements EnvironmentC
|
||||
for (String type : types) {
|
||||
MetadataReader metadataReader = getMetadataReaderFactory().getMetadataReader(type);
|
||||
if (isCandidateComponent(metadataReader)) {
|
||||
AnnotatedGenericBeanDefinition sbd = new AnnotatedGenericBeanDefinition(
|
||||
metadataReader.getAnnotationMetadata());
|
||||
ScannedGenericBeanDefinition sbd = new ScannedGenericBeanDefinition(metadataReader);
|
||||
if (isCandidateComponent(sbd)) {
|
||||
if (debugEnabled) {
|
||||
logger.debug("Using candidate component class from index: " + type);
|
||||
|
||||
Reference in New Issue
Block a user