You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: org.springframework.beans/src/main/java/org/springframework/beans/factory/support/DefaultListableBeanFactory.java
+8-6Lines changed: 8 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -543,7 +543,7 @@ public boolean isConfigurationFrozen() {
543
543
}
544
544
545
545
/**
546
-
* Considers all beans as eligible for metdata caching
546
+
* Considers all beans as eligible for metadata caching
547
547
* if the factory's configuration has been marked as frozen.
548
548
* @see #freezeConfiguration()
549
549
*/
@@ -556,9 +556,11 @@ public void preInstantiateSingletons() throws BeansException {
556
556
if (this.logger.isInfoEnabled()) {
557
557
this.logger.info("Pre-instantiating singletons in " + this);
558
558
}
559
-
560
559
synchronized (this.beanDefinitionMap) {
561
-
for (StringbeanName : this.beanDefinitionNames) {
560
+
// Iterate over a copy to allow for init methods which in turn register new bean definitions.
561
+
// While this may not be part of the regular factory bootstrap, it does otherwise work fine.
0 commit comments