Skip to content

Commit 0754fec

Browse files
christophstroblmp911de
authored andcommitted
Add missing reflection hint for QuerydslJpaPredicateExecutor.
Closes: #2673 Original pull request: #2674
1 parent 19c4b04 commit 0754fec

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/aot/JpaRuntimeHints.java

+10
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424
import org.springframework.data.jpa.domain.support.AuditingBeanFactoryPostProcessor;
2525
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
2626
import org.springframework.data.jpa.repository.Query;
27+
import org.springframework.data.jpa.repository.support.QuerydslJpaPredicateExecutor;
2728
import org.springframework.data.jpa.repository.support.SimpleJpaRepository;
29+
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
30+
import org.springframework.data.querydsl.QuerydslUtils;
2831
import org.springframework.lang.Nullable;
2932
import org.springframework.util.ClassUtils;
3033

@@ -62,5 +65,12 @@ public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader)
6265

6366
// needs to present for evaluating default attribute values in JpaQueryMethod
6467
hints.reflection().registerType(Query.class, hint -> hint.withMembers(MemberCategory.INVOKE_PUBLIC_METHODS));
68+
69+
if(QuerydslUtils.QUERY_DSL_PRESENT) {
70+
71+
hints.reflection().registerType(QuerydslJpaPredicateExecutor.class,
72+
hint -> hint.withMembers(MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS, MemberCategory.INVOKE_PUBLIC_METHODS)
73+
.onReachableType(QuerydslPredicateExecutor.class));
74+
}
6575
}
6676
}

0 commit comments

Comments
 (0)