Merge branch '6.1.x'
This commit is contained in:
@@ -101,8 +101,7 @@ class DefaultBeanRegistrationCodeFragments implements BeanRegistrationCodeFragme
|
||||
/**
|
||||
* Extract the target class of a public {@link FactoryBean} based on its
|
||||
* constructor. If the implementation does not resolve the target class
|
||||
* because it itself uses a generic, attempt to extract it from the
|
||||
* bean type.
|
||||
* because it itself uses a generic, attempt to extract it from the bean type.
|
||||
* @param factoryBeanType the factory bean type
|
||||
* @param beanType the bean type
|
||||
* @return the target class to use
|
||||
@@ -169,9 +168,11 @@ class DefaultBeanRegistrationCodeFragments implements BeanRegistrationCodeFragme
|
||||
|
||||
Loader loader = AotServices.factories(this.registeredBean.getBeanFactory().getBeanClassLoader());
|
||||
List<Delegate> additionalDelegates = loader.load(Delegate.class).asList();
|
||||
return new BeanDefinitionPropertiesCodeGenerator(generationContext.getRuntimeHints(),
|
||||
attributeFilter, beanRegistrationCode.getMethods(),
|
||||
additionalDelegates, (name, value) -> generateValueCode(generationContext, name, value))
|
||||
|
||||
return new BeanDefinitionPropertiesCodeGenerator(
|
||||
generationContext.getRuntimeHints(), attributeFilter,
|
||||
beanRegistrationCode.getMethods(), additionalDelegates,
|
||||
(name, value) -> generateValueCode(generationContext, name, value))
|
||||
.generateCode(beanDefinition);
|
||||
}
|
||||
|
||||
@@ -230,8 +231,8 @@ class DefaultBeanRegistrationCodeFragments implements BeanRegistrationCodeFragme
|
||||
if (hasInstanceSupplier()) {
|
||||
throw new AotBeanProcessingException(this.registeredBean, "instance supplier is not supported");
|
||||
}
|
||||
return new InstanceSupplierCodeGenerator(generationContext, beanRegistrationCode.getClassName(),
|
||||
beanRegistrationCode.getMethods(), allowDirectSupplierShortcut)
|
||||
return new InstanceSupplierCodeGenerator(generationContext,
|
||||
beanRegistrationCode.getClassName(), beanRegistrationCode.getMethods(), allowDirectSupplierShortcut)
|
||||
.generateCode(this.registeredBean, this.instantiationDescriptor.get());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user