2121import java .util .Collections ;
2222import java .util .List ;
2323
24- import org .springframework .aot .hint .ExecutableMode ;
25-
2624import org .jspecify .annotations .Nullable ;
25+ import org .springframework .aot .hint .ExecutableMode ;
2726import org .springframework .aot .hint .MemberCategory ;
2827import org .springframework .aot .hint .RuntimeHints ;
2928import org .springframework .aot .hint .RuntimeHintsRegistrar ;
@@ -84,7 +83,7 @@ public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader)
8483// make sure annotations on the fields are visible and allow reflection on protected methods
8584hints .reflection ().registerTypes (
8685List .of (TypeReference .of (AbstractPersistable .class ), TypeReference .of (AbstractAuditable .class )),
87- hint -> hint .withMembers (MemberCategory .DECLARED_FIELDS , MemberCategory .INVOKE_DECLARED_METHODS ));
86+ hint -> hint .withMembers (MemberCategory .ACCESS_DECLARED_FIELDS , MemberCategory .INVOKE_DECLARED_METHODS ));
8887
8988if (QuerydslUtils .QUERY_DSL_PRESENT ) {
9089
@@ -94,9 +93,8 @@ public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader)
9493}
9594
9695// streaming results requires reflective access to jakarta.persistence.Query#getResultAsStream
97- hints .reflection ().registerType (jakarta .persistence .Query .class , MemberCategory .INTROSPECT_PUBLIC_METHODS );
98- hints .reflection ().registerType (jakarta .persistence .Query .class , hint ->
99- hint .withMethod ("getResultStream" , Collections .emptyList (), ExecutableMode .INVOKE ));
96+ hints .reflection ().registerType (jakarta .persistence .Query .class ,
97+ hint -> hint .withMethod ("getResultStream" , Collections .emptyList (), ExecutableMode .INVOKE ));
10098
10199hints .reflection ().registerType (NamedEntityGraph .class ,
102100hint -> hint .onReachableType (EntityGraph .class ).withMembers (MemberCategory .INVOKE_PUBLIC_METHODS ));
0 commit comments