Skip to content

Commit 3e80b97

Browse files
add missing runtime hint
1 parent b6b419b commit 3e80b97

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/main/java/org/springframework/data/repository/aot/hint/RepositoryRuntimeHints.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@
1818
import java.util.Arrays;
1919
import java.util.Properties;
2020

21+
import org.springframework.aop.SpringProxy;
22+
import org.springframework.aop.framework.Advised;
2123
import org.springframework.aot.hint.MemberCategory;
2224
import org.springframework.aot.hint.RuntimeHints;
2325
import org.springframework.aot.hint.RuntimeHintsRegistrar;
2426
import org.springframework.aot.hint.TypeReference;
2527
import org.springframework.beans.factory.BeanFactory;
28+
import org.springframework.core.DecoratingProxy;
2629
import org.springframework.core.io.InputStreamSource;
2730
import org.springframework.data.domain.Example;
2831
import org.springframework.data.mapping.context.MappingContext;
@@ -99,5 +102,13 @@ public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader)
99102
// annotated queries
100103
hints.proxies().registerJdkProxy( //
101104
TypeReference.of("org.springframework.data.annotation.QueryAnnotation"));
105+
106+
registerSpringProxy(TypeReference.of("org.springframework.data.repository.core.RepositoryMethodContext"), hints);
107+
}
108+
109+
private static void registerSpringProxy(TypeReference type, RuntimeHints runtimeHints) {
110+
111+
runtimeHints.proxies().registerJdkProxy(type, TypeReference.of(SpringProxy.class),
112+
TypeReference.of(Advised.class), TypeReference.of(DecoratingProxy.class));
102113
}
103114
}

0 commit comments

Comments
 (0)