Skip to content

Commit b027f15

Browse files
christophstroblmp911de
authored andcommitted
Add missing runtime hint for QuerydslMongoPredicateExecutor.
Closes: #4211 Original pull request: #4212
1 parent fd0a554 commit b027f15

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/aot/MongoRuntimeHints.java

+9
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
import org.springframework.data.mongodb.core.mapping.event.ReactiveAfterSaveCallback;
3030
import org.springframework.data.mongodb.core.mapping.event.ReactiveBeforeConvertCallback;
3131
import org.springframework.data.mongodb.core.mapping.event.ReactiveBeforeSaveCallback;
32+
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
33+
import org.springframework.data.querydsl.QuerydslUtils;
3234
import org.springframework.data.repository.util.ReactiveWrappers;
3335
import org.springframework.lang.Nullable;
3436

@@ -63,6 +65,13 @@ public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader)
6365
TypeReference.of(ReactiveAfterConvertCallback.class), TypeReference.of(ReactiveAfterSaveCallback.class)),
6466
builder -> builder.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS,
6567
MemberCategory.INVOKE_PUBLIC_METHODS));
68+
69+
if(QuerydslUtils.QUERY_DSL_PRESENT) {
70+
71+
hints.reflection().registerType(TypeReference.of("org.springframework.data.mongodb.repository.support.QuerydslMongoPredicateExecutor"),
72+
hint -> hint.withMembers(MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS, MemberCategory.INVOKE_PUBLIC_METHODS)
73+
.onReachableType(QuerydslPredicateExecutor.class));
74+
}
6675
}
6776
}
6877
}

0 commit comments

Comments
 (0)