Add missing reflection hint for QuerydslJpaPredicateExecutor.

Closes: #2673
Original pull request: #2674
This commit is contained in:
Christoph Strobl
2022-10-19 14:49:59 +02:00
committed by Mark Paluch
parent 19c4b04bc4
commit 0754fecd73

View File

@@ -24,7 +24,10 @@ import org.springframework.aot.hint.TypeReference;
import org.springframework.data.jpa.domain.support.AuditingBeanFactoryPostProcessor;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.jpa.repository.support.QuerydslJpaPredicateExecutor;
import org.springframework.data.jpa.repository.support.SimpleJpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
import org.springframework.data.querydsl.QuerydslUtils;
import org.springframework.lang.Nullable;
import org.springframework.util.ClassUtils;
@@ -62,5 +65,12 @@ class JpaRuntimeHints implements RuntimeHintsRegistrar {
// needs to present for evaluating default attribute values in JpaQueryMethod
hints.reflection().registerType(Query.class, hint -> hint.withMembers(MemberCategory.INVOKE_PUBLIC_METHODS));
if(QuerydslUtils.QUERY_DSL_PRESENT) {
hints.reflection().registerType(QuerydslJpaPredicateExecutor.class,
hint -> hint.withMembers(MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS, MemberCategory.INVOKE_PUBLIC_METHODS)
.onReachableType(QuerydslPredicateExecutor.class));
}
}
}