Skip to content

Commit 4d2a4ca

Browse files
committed
Fix GatewayProxyInstPProc for AOT expectations
Turns out the AOT engine deals only with indexed constructor arguments for bean definition * Rework `GatewayProxyInstantiationPostProcessor.processAheadOfTime()` to populate a service interface type as an indexed ctor argument instead of generic one
1 parent e19e6d4 commit 4d2a4ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-integration-core/src/main/java/org/springframework/integration/config/GatewayProxyInstantiationPostProcessor.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public BeanRegistrationAotContribution processAheadOfTime(RegisteredBean registe
8888
if (beanClass.isInterface() && AnnotatedElementUtils.hasAnnotation(beanClass, MessagingGateway.class)) {
8989
RootBeanDefinition beanDefinition = registeredBean.getMergedBeanDefinition();
9090
beanDefinition.setBeanClass(AnnotationGatewayProxyFactoryBean.class);
91-
beanDefinition.getConstructorArgumentValues().addGenericArgumentValue(beanClass);
91+
beanDefinition.getConstructorArgumentValues().addIndexedArgumentValue(0, beanClass);
9292
beanDefinition.setTargetType(
9393
ResolvableType.forClassWithGenerics(AnnotationGatewayProxyFactoryBean.class, beanClass));
9494
}

0 commit comments

Comments
 (0)