Skip to content

Commit 924b684

Browse files
committed
Consistently propagate ApplicationStartup to BeanFactory
Closes gh-32747 (cherry picked from commit 25cedcf)
1 parent a48e2f3 commit 924b684

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,7 @@ public void setSecurityContextProvider(SecurityContextProvider securityProvider)
10801080

10811081
@Override
10821082
public void setApplicationStartup(ApplicationStartup applicationStartup) {
1083-
Assert.notNull(applicationStartup, "applicationStartup should not be null");
1083+
Assert.notNull(applicationStartup, "ApplicationStartup must not be null");
10841084
this.applicationStartup = applicationStartup;
10851085
}
10861086

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)