detect @Bean methods on registered plain bean classes as well (SPR-5795)

This commit is contained in:
Juergen Hoeller
2009-09-24 10:45:56 +00:00
parent 38110d35d2
commit b8c1130eec
4 changed files with 36 additions and 1 deletions

View File

@@ -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;
}