From d8094ecb737d3174785eaf8fd37f0357535996e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Nicoll?= Date: Mon, 12 Sep 2022 13:00:41 +0200 Subject: [PATCH] Adapt to API change in Spring Framework (#1146) See https://github.com/spring-projects/spring-framework/issues/29005 --- .../loadbalancer/aot/LoadBalancerChildContextInitializer.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/spring-cloud-loadbalancer/src/main/java/org/springframework/cloud/loadbalancer/aot/LoadBalancerChildContextInitializer.java b/spring-cloud-loadbalancer/src/main/java/org/springframework/cloud/loadbalancer/aot/LoadBalancerChildContextInitializer.java index eb3f7153f..217d77797 100644 --- a/spring-cloud-loadbalancer/src/main/java/org/springframework/cloud/loadbalancer/aot/LoadBalancerChildContextInitializer.java +++ b/spring-cloud-loadbalancer/src/main/java/org/springframework/cloud/loadbalancer/aot/LoadBalancerChildContextInitializer.java @@ -27,7 +27,6 @@ import org.springframework.aot.generate.GeneratedMethod; import org.springframework.aot.generate.GenerationContext; -import org.springframework.aot.generate.MethodReference; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.aot.BeanRegistrationAotContribution; import org.springframework.beans.factory.aot.BeanRegistrationAotProcessor; @@ -172,8 +171,7 @@ public void applyTo(GenerationContext generationContext, BeanRegistrationCode be generatedInitializerClassNames.get(contextId))); method.addStatement("return instance.withApplicationContextInitializers(initializers)"); }); - beanRegistrationCode.addInstancePostProcessor( - MethodReference.ofStatic(beanRegistrationCode.getClassName(), postProcessorMethod.getName())); + beanRegistrationCode.addInstancePostProcessor(postProcessorMethod.toMethodReference()); } }