From 66b00e286d6bc9ff59d213a1e40519d4789f78ec Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Mon, 9 Oct 2023 15:38:15 +0200 Subject: [PATCH] Update native-image runtime hints. Closes: #2729 --- .../data/redis/aot/RedisRuntimeHints.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/springframework/data/redis/aot/RedisRuntimeHints.java b/src/main/java/org/springframework/data/redis/aot/RedisRuntimeHints.java index 29595a5f24..127b0d76e7 100644 --- a/src/main/java/org/springframework/data/redis/aot/RedisRuntimeHints.java +++ b/src/main/java/org/springframework/data/redis/aot/RedisRuntimeHints.java @@ -136,7 +136,8 @@ public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) TypeReference.of(KeyValueRepository.class), TypeReference.of(KeyValueRepositoryFactoryBean.class), TypeReference.of(QueryCreatorType.class), TypeReference.of(KeyValuePartTreeQuery.class)), - hint -> hint.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS, MemberCategory.INVOKE_DECLARED_METHODS)); + hint -> hint.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS, MemberCategory.INVOKE_DECLARED_METHODS, + MemberCategory.INVOKE_PUBLIC_METHODS)); // PROXIES hints.proxies().registerJdkProxy(TypeReference.of(RedisConnection.class)); @@ -164,12 +165,12 @@ static void boundOperationsProxy(TypeReference typeReference, ClassLoader classL String boundTargetClass = typeReference.getPackageName() + "." + typeReference.getSimpleName().replace("Bound", ""); if (ClassUtils.isPresent(boundTargetClass, classLoader)) { - hints.reflection().registerType(TypeReference.of(boundTargetClass), hint -> hint - .withMembers(MemberCategory.INVOKE_DECLARED_METHODS)); + hints.reflection().registerType(TypeReference.of(boundTargetClass), + hint -> hint.withMembers(MemberCategory.INVOKE_DECLARED_METHODS, MemberCategory.INVOKE_PUBLIC_METHODS)); } - hints.reflection().registerType(typeReference, hint -> hint - .withMembers(MemberCategory.INVOKE_DECLARED_METHODS)); + hints.reflection().registerType(typeReference, + hint -> hint.withMembers(MemberCategory.INVOKE_DECLARED_METHODS, MemberCategory.INVOKE_PUBLIC_METHODS)); hints.proxies().registerJdkProxy(typeReference, // TypeReference.of("org.springframework.aop.SpringProxy"), //