Skip to content

Commit 25cedcf

Browse files
committed
Consistently propagate ApplicationStartup to BeanFactory
Closes gh-32747
1 parent 610626a commit 25cedcf

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
@@ -1098,7 +1098,7 @@ public Scope getRegisteredScope(String scopeName) {
10981098

10991099
@Override
11001100
public void setApplicationStartup(ApplicationStartup applicationStartup) {
1101-
Assert.notNull(applicationStartup, "applicationStartup must not be null");
1101+
Assert.notNull(applicationStartup, "ApplicationStartup must not be null");
11021102
this.applicationStartup = applicationStartup;
11031103
}
11041104

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-2023 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)