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
This commit is contained in:
@@ -88,7 +88,7 @@ class GatewayProxyInstantiationPostProcessor implements
|
||||
if (beanClass.isInterface() && AnnotatedElementUtils.hasAnnotation(beanClass, MessagingGateway.class)) {
|
||||
RootBeanDefinition beanDefinition = registeredBean.getMergedBeanDefinition();
|
||||
beanDefinition.setBeanClass(AnnotationGatewayProxyFactoryBean.class);
|
||||
beanDefinition.getConstructorArgumentValues().addGenericArgumentValue(beanClass);
|
||||
beanDefinition.getConstructorArgumentValues().addIndexedArgumentValue(0, beanClass);
|
||||
beanDefinition.setTargetType(
|
||||
ResolvableType.forClassWithGenerics(AnnotationGatewayProxyFactoryBean.class, beanClass));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user