23
23
import org .springframework .data .neo4j .core .mapping .callback .BeforeBindCallback ;
24
24
import org .springframework .data .neo4j .core .schema .GeneratedValue ;
25
25
import org .springframework .data .neo4j .core .support .UUIDStringGenerator ;
26
+ import org .springframework .data .neo4j .repository .query .QuerydslNeo4jPredicateExecutor ;
27
+ import org .springframework .data .neo4j .repository .query .ReactiveQuerydslNeo4jPredicateExecutor ;
26
28
import org .springframework .data .neo4j .repository .query .SimpleQueryByExampleExecutor ;
29
+ import org .springframework .data .neo4j .repository .query .SimpleReactiveQueryByExampleExecutor ;
27
30
import org .springframework .data .neo4j .repository .support .SimpleNeo4jRepository ;
31
+ import org .springframework .data .neo4j .repository .support .SimpleReactiveNeo4jRepository ;
32
+ import org .springframework .data .querydsl .QuerydslUtils ;
33
+ import org .springframework .data .util .ReactiveWrappers ;
28
34
import org .springframework .lang .Nullable ;
29
35
30
36
import java .util .Arrays ;
@@ -51,5 +57,30 @@ public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader)
51
57
),
52
58
builder -> builder .withMembers (MemberCategory .INVOKE_DECLARED_CONSTRUCTORS ,
53
59
MemberCategory .INVOKE_PUBLIC_METHODS ));
60
+
61
+ if (ReactiveWrappers .isAvailable (ReactiveWrappers .ReactiveLibrary .PROJECT_REACTOR )) {
62
+ hints .reflection ().registerTypes (
63
+ Arrays .asList (
64
+ TypeReference .of (SimpleReactiveQueryByExampleExecutor .class ),
65
+ TypeReference .of (SimpleReactiveNeo4jRepository .class )
66
+ ),
67
+ builder -> builder .withMembers (MemberCategory .INVOKE_DECLARED_CONSTRUCTORS , MemberCategory .INVOKE_PUBLIC_METHODS ));
68
+ }
69
+
70
+ if (QuerydslUtils .QUERY_DSL_PRESENT ) {
71
+ registerQuerydslHints (hints );
72
+ }
73
+ }
74
+
75
+ private static void registerQuerydslHints (RuntimeHints hints ) {
76
+
77
+ hints .reflection ().registerType (QuerydslNeo4jPredicateExecutor .class ,
78
+ MemberCategory .INVOKE_PUBLIC_METHODS , MemberCategory .INVOKE_DECLARED_CONSTRUCTORS );
79
+
80
+ if (ReactiveWrappers .isAvailable (ReactiveWrappers .ReactiveLibrary .PROJECT_REACTOR )) {
81
+ hints .reflection ().registerType (ReactiveQuerydslNeo4jPredicateExecutor .class ,
82
+ MemberCategory .INVOKE_PUBLIC_METHODS , MemberCategory .INVOKE_DECLARED_CONSTRUCTORS );
83
+ }
84
+
54
85
}
55
86
}
0 commit comments