Add resource hint for BeanRegistrar implementing ImportAware

Closes gh-36242
This commit is contained in:
Sébastien Deleuze
2026-02-02 15:44:16 +01:00
parent d31bd8139d
commit 29d125e659
2 changed files with 19 additions and 0 deletions
@@ -999,6 +999,7 @@ public class ConfigurationClassPostProcessor implements BeanDefinitionRegistryPo
.addStatement("throw new $T(\"Failed to read metadata for '$L'\", ex)",
IllegalStateException.class, beanRegistrarEntry.getKey())
.endControlFlow();
generationContext.getRuntimeHints().resources().registerType(TypeReference.of(beanRegistrarEntry.getKey()));
}
code.addStatement("$L.register(new $T(($T)$L, $L, $L, $L.getClass(), $L), $L)", beanRegistrarName,
BeanRegistryAdapter.class, BeanDefinitionRegistry.class, BeanFactoryInitializationCode.BEAN_FACTORY_VARIABLE,