Skip to content

Commit 4cb9ad7

Browse files
Use RuntimeHintsUtils to register annotations.
1 parent 1b9e17f commit 4cb9ad7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@
2222
import org.springframework.aot.hint.RuntimeHints;
2323
import org.springframework.aot.hint.RuntimeHintsRegistrar;
2424
import org.springframework.aot.hint.TypeReference;
25+
import org.springframework.aot.hint.support.RuntimeHintsUtils;
2526
import org.springframework.beans.factory.BeanFactory;
2627
import org.springframework.core.io.InputStreamSource;
28+
import org.springframework.data.annotation.QueryAnnotation;
2729
import org.springframework.data.mapping.context.MappingContext;
2830
import org.springframework.data.repository.core.RepositoryMetadata;
2931
import org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport;
@@ -76,8 +78,6 @@ public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader)
7678
MemberCategory.INVOKE_DECLARED_METHODS, MemberCategory.INVOKE_PUBLIC_METHODS));
7779

7880
// annotated queries
79-
hints.proxies().registerJdkProxy( //
80-
TypeReference.of("org.springframework.data.annotation.QueryAnnotation"), //
81-
TypeReference.of("org.springframework.core.annotation.SynthesizedAnnotation"));
81+
RuntimeHintsUtils.registerAnnotation(hints, QueryAnnotation.class);
8282
}
8383
}

0 commit comments

Comments
 (0)