Fix support for target arrays
This commits makes sure that a bean that produces an array can be processed ahead of time. If the request target type is an array, its component type is used. Closes gh-31426
This commit is contained in:
@@ -83,7 +83,7 @@ class DefaultBeanRegistrationCodeFragments implements BeanRegistrationCodeFragme
|
||||
Assert.state(parent != null, "No parent available for inner bean");
|
||||
target = parent.getBeanClass();
|
||||
}
|
||||
return ClassName.get(target);
|
||||
return (target.isArray() ? ClassName.get(target.getComponentType()) : ClassName.get(target));
|
||||
}
|
||||
|
||||
private Class<?> extractDeclaringClass(ResolvableType beanType, Executable executable) {
|
||||
|
||||
Reference in New Issue
Block a user