Skip to content

Commit bee6f41

Browse files
cprayerwilkinsona
authored andcommitted
Add Bootstrapper initialize method to fix typo
See gh-25400
1 parent ddf75f0 commit bee6f41

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/Bootstrapper.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,17 @@ public interface Bootstrapper {
3131
* Initialize the given {@link BootstrapRegistry} with any required registrations.
3232
* @param registry the registry to initialize
3333
*/
34+
default void initialize(BootstrapRegistry registry) {
35+
intitialize(registry);
36+
}
37+
38+
/**
39+
* Initialize the given {@link BootstrapRegistry} with any required registrations.
40+
* @param registry the registry to initialize
41+
* @deprecated since 2.4.4 in favor of
42+
* {@link Bootstrapper#initialize(BootstrapRegistry)}
43+
*/
44+
@Deprecated
3445
void intitialize(BootstrapRegistry registry);
3546

3647
}

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ public ConfigurableApplicationContext run(String... args) {
349349

350350
private DefaultBootstrapContext createBootstrapContext() {
351351
DefaultBootstrapContext bootstrapContext = new DefaultBootstrapContext();
352-
this.bootstrappers.forEach((initializer) -> initializer.intitialize(bootstrapContext));
352+
this.bootstrappers.forEach((initializer) -> initializer.initialize(bootstrapContext));
353353
return bootstrapContext;
354354
}
355355

0 commit comments

Comments
 (0)