Skip to content

Commit b56c8f4

Browse files
committed
AbstractApplicationContext logs initialization exception before trying to cancel refresh attempt
Issue: SPR-12010 (cherry picked from commit 5e2fbe7)
1 parent 619e3a9 commit b56c8f4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spring-context/src/main/java/org/springframework/context/support/AbstractApplicationContext.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2014 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -483,6 +483,8 @@ public void refresh() throws BeansException, IllegalStateException {
483483
}
484484

485485
catch (BeansException ex) {
486+
logger.warn("Exception encountered during context initialization - cancelling refresh attempt", ex);
487+
486488
// Destroy already created singletons to avoid dangling resources.
487489
destroyBeans();
488490

0 commit comments

Comments
 (0)