Polishing
This commit is contained in:
@@ -349,6 +349,9 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
|
|||||||
|
|
||||||
else {
|
else {
|
||||||
String scopeName = mbd.getScope();
|
String scopeName = mbd.getScope();
|
||||||
|
if (!StringUtils.hasLength(scopeName)) {
|
||||||
|
throw new IllegalStateException("No scope name defined for bean ´" + beanName + "'");
|
||||||
|
}
|
||||||
Scope scope = this.scopes.get(scopeName);
|
Scope scope = this.scopes.get(scopeName);
|
||||||
if (scope == null) {
|
if (scope == null) {
|
||||||
throw new IllegalStateException("No Scope registered for scope name '" + scopeName + "'");
|
throw new IllegalStateException("No Scope registered for scope name '" + scopeName + "'");
|
||||||
|
|||||||
@@ -555,12 +555,12 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
|
|||||||
LogMessage.format("Ignoring bean class loading failure for bean '%s'", beanName) :
|
LogMessage.format("Ignoring bean class loading failure for bean '%s'", beanName) :
|
||||||
LogMessage.format("Ignoring unresolvable metadata in bean definition '%s'", beanName));
|
LogMessage.format("Ignoring unresolvable metadata in bean definition '%s'", beanName));
|
||||||
logger.trace(message, ex);
|
logger.trace(message, ex);
|
||||||
|
// Register exception, in case the bean was accidentally unresolvable.
|
||||||
onSuppressedException(ex);
|
onSuppressedException(ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Check manually registered singletons too.
|
// Check manually registered singletons too.
|
||||||
for (String beanName : this.manualSingletonNames) {
|
for (String beanName : this.manualSingletonNames) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user