Skip to content

Commit

Permalink
Add missing runtime hint for QuerydslMongoPredicateExecutor.
Browse files Browse the repository at this point in the history
Closes: #4211
Original pull request: #4212
  • Loading branch information
christophstrobl authored and mp911de committed Oct 24, 2022
1 parent fd0a554 commit b027f15
Showing 1 changed file with 9 additions and 0 deletions.
Expand Up @@ -29,6 +29,8 @@
import org.springframework.data.mongodb.core.mapping.event.ReactiveAfterSaveCallback;
import org.springframework.data.mongodb.core.mapping.event.ReactiveBeforeConvertCallback;
import org.springframework.data.mongodb.core.mapping.event.ReactiveBeforeSaveCallback;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
import org.springframework.data.querydsl.QuerydslUtils;
import org.springframework.data.repository.util.ReactiveWrappers;
import org.springframework.lang.Nullable;

Expand Down Expand Up @@ -63,6 +65,13 @@ public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader)
TypeReference.of(ReactiveAfterConvertCallback.class), TypeReference.of(ReactiveAfterSaveCallback.class)),
builder -> builder.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS,
MemberCategory.INVOKE_PUBLIC_METHODS));

if(QuerydslUtils.QUERY_DSL_PRESENT) {

hints.reflection().registerType(TypeReference.of("org.springframework.data.mongodb.repository.support.QuerydslMongoPredicateExecutor"),
hint -> hint.withMembers(MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS, MemberCategory.INVOKE_PUBLIC_METHODS)
.onReachableType(QuerydslPredicateExecutor.class));
}
}
}
}

0 comments on commit b027f15

Please sign in to comment.