Skip to content

Commit abd5f18

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

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-2013 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.
@@ -486,6 +486,8 @@ public void refresh() throws BeansException, IllegalStateException {
486486
}
487487

488488
catch (BeansException ex) {
489+
logger.warn("Exception encountered during context initialization - cancelling refresh attempt", ex);
490+
489491
// Destroy already created singletons to avoid dangling resources.
490492
destroyBeans();
491493

0 commit comments

Comments
 (0)