mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-20 20:59:07 +00:00
detect @Bean methods on registered plain bean classes as well (SPR-5795)
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@1984 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
+2
-1
@@ -222,7 +222,8 @@ public class ConfigurationClassPostProcessor implements BeanFactoryPostProcessor
|
||||
beanDef.setAttribute(CONFIGURATION_CLASS_ATTRIBUTE, CONFIGURATION_CLASS_FULL);
|
||||
return true;
|
||||
}
|
||||
else if (metadata.isAnnotated(Component.class.getName())) {
|
||||
else if (metadata.isAnnotated(Component.class.getName()) ||
|
||||
metadata.hasAnnotatedMethods(Bean.class.getName())) {
|
||||
beanDef.setAttribute(CONFIGURATION_CLASS_ATTRIBUTE, CONFIGURATION_CLASS_LITE);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user