Skip to content

Commit 1af5994

Browse files
committed
Adapt to API change in Spring Framework
See spring-projects/spring-framework#28927
1 parent 36cf3b9 commit 1af5994

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/ChildManagementContextInitializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ private static class AotContribution implements BeanRegistrationAotContribution
163163
public void applyTo(GenerationContext generationContext, BeanRegistrationCode beanRegistrationCode) {
164164
GenerationContext managementGenerationContext = generationContext.withName("Management");
165165
ClassName generatedInitializerClassName = new ApplicationContextAotGenerator()
166-
.generateApplicationContext(this.managementContext, managementGenerationContext);
166+
.processAheadOfTime(this.managementContext, managementGenerationContext);
167167
GeneratedMethod postProcessorMethod = beanRegistrationCode.getMethods().add("addManagementInitializer",
168168
(method) -> method.addJavadoc("Use AOT management context initialization")
169169
.addModifiers(Modifier.PRIVATE, Modifier.STATIC)

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/server/ChildManagementContextInitializerAotTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ void aotContributedInitializerStartsManagementContext(CapturedOutput output) {
7575
EndpointAutoConfiguration.class));
7676
contextRunner.withPropertyValues("server.port=0", "management.server.port=0").prepare((context) -> {
7777
TestGenerationContext generationContext = new TestGenerationContext(TestTarget.class);
78-
ClassName className = new ApplicationContextAotGenerator().generateApplicationContext(
78+
ClassName className = new ApplicationContextAotGenerator().processAheadOfTime(
7979
(GenericApplicationContext) context.getSourceApplicationContext(), generationContext);
8080
generationContext.writeGeneratedContent();
8181
TestCompiler compiler = TestCompiler.forSystem();

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,7 @@ private void performAotProcessing(GenericApplicationContext applicationContext)
147147
DefaultGenerationContext generationContext = new DefaultGenerationContext(
148148
new ClassNameGenerator(this.application), generatedFiles);
149149
ApplicationContextAotGenerator generator = new ApplicationContextAotGenerator();
150-
ClassName generatedInitializerClassName = generator.generateApplicationContext(applicationContext,
151-
generationContext);
150+
ClassName generatedInitializerClassName = generator.processAheadOfTime(applicationContext, generationContext);
152151
registerEntryPointHint(generationContext, generatedInitializerClassName);
153152
generationContext.writeGeneratedContent();
154153
writeHints(generationContext.getRuntimeHints());

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesBeanRegistrationAotProcessorTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,7 @@ private GenericApplicationContext createContext(Class<?>... types) {
143143
@SuppressWarnings("unchecked")
144144
private void compile(GenericApplicationContext context, Consumer<GenericApplicationContext> freshContext) {
145145
TestGenerationContext generationContext = new TestGenerationContext(TestTarget.class);
146-
ClassName className = new ApplicationContextAotGenerator().generateApplicationContext(context,
147-
generationContext);
146+
ClassName className = new ApplicationContextAotGenerator().processAheadOfTime(context, generationContext);
148147
generationContext.writeGeneratedContent();
149148
TestCompiler.forSystem().withFiles(generationContext.getGeneratedFiles()).compile((compiled) -> {
150149
GenericApplicationContext freshApplicationContext = new GenericApplicationContext();

0 commit comments

Comments
 (0)