Skip to content

Commit 9a31f3b

Browse files
committed
Consistently propagate ApplicationStartup to BeanFactory
Closes gh-32747 (cherry picked from commit 25cedcf)
1 parent b11d118 commit 9a31f3b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Diff for: spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,7 @@ public Scope getRegisteredScope(String scopeName) {
10531053

10541054
@Override
10551055
public void setApplicationStartup(ApplicationStartup applicationStartup) {
1056-
Assert.notNull(applicationStartup, "applicationStartup must not be null");
1056+
Assert.notNull(applicationStartup, "ApplicationStartup must not be null");
10571057
this.applicationStartup = applicationStartup;
10581058
}
10591059

Diff for: spring-context/src/main/java/org/springframework/context/support/AbstractRefreshableApplicationContext.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2024 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.
@@ -126,6 +126,7 @@ protected final void refreshBeanFactory() throws BeansException {
126126
try {
127127
DefaultListableBeanFactory beanFactory = createBeanFactory();
128128
beanFactory.setSerializationId(getId());
129+
beanFactory.setApplicationStartup(getApplicationStartup());
129130
customizeBeanFactory(beanFactory);
130131
loadBeanDefinitions(beanFactory);
131132
this.beanFactory = beanFactory;

0 commit comments

Comments
 (0)