Move off deprecated API in AOT support.

Closes #3305
Original pull request: #3307
This commit is contained in:
Christoph Strobl
2025-06-04 11:38:55 +02:00
committed by Mark Paluch
parent 9ce25da431
commit b97cc46469
4 changed files with 4 additions and 5 deletions

View File

@@ -92,7 +92,7 @@ class RepositoryRuntimeHints implements RuntimeHintsRegistrar {
//
hints.reflection().registerType(Throwable.class,
builder -> builder.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS, MemberCategory.DECLARED_FIELDS));
builder -> builder.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS, MemberCategory.ACCESS_DECLARED_FIELDS));
// SpEL support
hints.reflection().registerType(

View File

@@ -332,8 +332,7 @@ public class RepositoryRegistrationAotContribution implements BeanRegistrationAo
// Kotlin
if (isKotlinCoroutineRepository(repositoryContext, repositoryInformation)) {
contribution.getRuntimeHints().reflection().registerTypes(kotlinRepositoryReflectionTypeReferences(),
hint -> hint.withMembers(MemberCategory.INTROSPECT_PUBLIC_METHODS));
contribution.getRuntimeHints().reflection().registerTypes(kotlinRepositoryReflectionTypeReferences(), hint -> {});
}
// Repository query methods

View File

@@ -56,7 +56,7 @@ public class QTypeContributor {
logger.debug("Registering Q type %s for %s.");
context.getRuntimeHints().reflection().registerType(TypeReference.of(queryClassName),
MemberCategory.INVOKE_PUBLIC_METHODS, MemberCategory.INVOKE_DECLARED_CONSTRUCTORS,
MemberCategory.INTROSPECT_DECLARED_METHODS, MemberCategory.DECLARED_FIELDS);
MemberCategory.ACCESS_DECLARED_FIELDS);
} else {
logger.debug("Skipping Q type %s. Not an EntityPath.");
}

View File

@@ -62,7 +62,7 @@ public class TypeContributor {
if (type.isAnnotation() && filter.test((Class<? extends Annotation>) type)) {
contribution.getRuntimeHints().reflection().registerType(type,
hint -> hint.withMembers(MemberCategory.INTROSPECT_PUBLIC_METHODS));
hint -> {});
return;
}