Add missing reflection hint in BeanRegistrationsAotContribution
Prior to this commit, the `BeanRegistrationsAotContribution` would only contribute introspection hints for declared methods. This does not cover inherited public methods. This commit adds the missing hint on public methods. Fixes gh-31293
This commit is contained in:
@@ -117,10 +117,10 @@ class BeanRegistrationsAotContribution
|
||||
registrations.keySet().forEach(beanRegistrationKey -> {
|
||||
ReflectionHints hints = runtimeHints.reflection();
|
||||
Class<?> beanClass = beanRegistrationKey.beanClass();
|
||||
hints.registerType(beanClass, MemberCategory.INTROSPECT_DECLARED_METHODS);
|
||||
hints.registerType(beanClass, MemberCategory.INTROSPECT_PUBLIC_METHODS, MemberCategory.INTROSPECT_DECLARED_METHODS);
|
||||
// Workaround for https://github.com/oracle/graal/issues/6510
|
||||
if (beanClass.isRecord()) {
|
||||
hints.registerType(beanClass, MemberCategory.INVOKE_DECLARED_METHODS);
|
||||
hints.registerType(beanClass, MemberCategory.INVOKE_PUBLIC_METHODS, MemberCategory.INVOKE_DECLARED_METHODS);
|
||||
}
|
||||
// Workaround for https://github.com/oracle/graal/issues/6529
|
||||
ReflectionUtils.doWithMethods(beanClass, method -> {
|
||||
|
||||
Reference in New Issue
Block a user