Skip to content

Commit

Permalink
Update native-image runtime hints.
Browse files Browse the repository at this point in the history
Closes: #2729
  • Loading branch information
christophstrobl committed Oct 9, 2023
1 parent 6cc1a91 commit 66b00e2
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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"), //
Expand Down

0 comments on commit 66b00e2

Please sign in to comment.