From c2293efb020d4717534e8a503139930da728258b Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Tue, 18 Oct 2022 16:08:46 +0200 Subject: [PATCH] Add missing reflection hints. Allow Kotlin to resolve everything it needs. Closes #2717 Original pull request: #2720 --- .../data/repository/aot/hint/RepositoryRuntimeHints.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/springframework/data/repository/aot/hint/RepositoryRuntimeHints.java b/src/main/java/org/springframework/data/repository/aot/hint/RepositoryRuntimeHints.java index 8cd5b799a..70056b1b2 100644 --- a/src/main/java/org/springframework/data/repository/aot/hint/RepositoryRuntimeHints.java +++ b/src/main/java/org/springframework/data/repository/aot/hint/RepositoryRuntimeHints.java @@ -30,6 +30,9 @@ import org.springframework.data.repository.core.support.RepositoryFactoryBeanSup import org.springframework.data.repository.core.support.RepositoryFragment; import org.springframework.data.repository.core.support.RepositoryFragmentsFactoryBean; import org.springframework.data.repository.core.support.TransactionalRepositoryFactoryBeanSupport; +import org.springframework.data.repository.query.FluentQuery; +import org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery; +import org.springframework.data.repository.query.FluentQuery.ReactiveFluentQuery; import org.springframework.data.repository.query.QueryByExampleExecutor; import org.springframework.lang.Nullable; @@ -53,7 +56,10 @@ class RepositoryRuntimeHints implements RuntimeHintsRegistrar { TypeReference.of(TransactionalRepositoryFactoryBeanSupport.class), // TypeReference.of(QueryByExampleExecutor.class), // TypeReference.of(MappingContext.class), // - TypeReference.of(RepositoryMetadata.class) // + TypeReference.of(RepositoryMetadata.class), // + TypeReference.of(FluentQuery.class), // + TypeReference.of(FetchableFluentQuery.class), // + TypeReference.of(ReactiveFluentQuery.class) // ), builder -> { builder.withMembers(MemberCategory.INVOKE_PUBLIC_METHODS); });