Reduced warn log entry without stacktrace for startup exceptions
Also, AbstractApplicationContext.isRunning avoids IllegalStateException now. Issue: SPR-13663 Issue: SPR-13667
This commit is contained in:
@@ -484,7 +484,10 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
|
|||||||
}
|
}
|
||||||
|
|
||||||
catch (BeansException ex) {
|
catch (BeansException ex) {
|
||||||
logger.warn("Exception encountered during context initialization - cancelling refresh attempt", ex);
|
if (logger.isWarnEnabled()) {
|
||||||
|
logger.warn("Exception encountered during context initialization - " +
|
||||||
|
"cancelling refresh attempt: " + ex);
|
||||||
|
}
|
||||||
|
|
||||||
// Destroy already created singletons to avoid dangling resources.
|
// Destroy already created singletons to avoid dangling resources.
|
||||||
destroyBeans();
|
destroyBeans();
|
||||||
@@ -1182,7 +1185,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isRunning() {
|
public boolean isRunning() {
|
||||||
return getLifecycleProcessor().isRunning();
|
return (this.lifecycleProcessor != null && this.lifecycleProcessor.isRunning());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user