diff --git a/pom.xml b/pom.xml
index 77d72c255e..6b7b819dd9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
org.springframework.data
spring-data-commons
- 3.4.0-SNAPSHOT
+ 3.4.x-GH-3117-SNAPSHOT
Spring Data Core
Core Spring concepts underpinning every Spring Data module.
diff --git a/src/main/java/org/springframework/data/web/aot/WebRuntimeHints.java b/src/main/java/org/springframework/data/web/aot/WebRuntimeHints.java
index f791ce4981..3a9aee614b 100644
--- a/src/main/java/org/springframework/data/web/aot/WebRuntimeHints.java
+++ b/src/main/java/org/springframework/data/web/aot/WebRuntimeHints.java
@@ -15,9 +15,11 @@
*/
package org.springframework.data.web.aot;
+import org.springframework.aot.hint.MemberCategory;
import org.springframework.aot.hint.RuntimeHints;
import org.springframework.aot.hint.RuntimeHintsRegistrar;
import org.springframework.aot.hint.TypeReference;
+import org.springframework.data.web.PagedModel;
import org.springframework.data.web.config.SpringDataJacksonConfiguration.PageModule;
import org.springframework.lang.Nullable;
import org.springframework.util.ClassUtils;
@@ -34,8 +36,30 @@ class WebRuntimeHints implements RuntimeHintsRegistrar {
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
if (ClassUtils.isPresent("com.fasterxml.jackson.databind.ObjectMapper", classLoader)) {
+
+ // Page Model for Jackson Rendering
+ hints.reflection().registerType(org.springframework.data.web.PagedModel.class,
+ MemberCategory.INVOKE_PUBLIC_METHODS);
+ hints.reflection().registerType(PagedModel.PageMetadata.class, MemberCategory.INVOKE_PUBLIC_METHODS);
+
+ // Type that might not be seen otherwise
hints.reflection().registerType(TypeReference.of("org.springframework.data.domain.Unpaged"),
hint -> hint.onReachableType(PageModule.class));
+
+ // Jackson Converters used via @JsonSerialize in SpringDataJacksonConfiguration
+ hints.reflection().registerType(
+ TypeReference
+ .of("org.springframework.data.web.config.SpringDataJacksonConfiguration$PageModule$PageModelConverter"),
+ hint -> {
+ hint.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS, MemberCategory.INVOKE_PUBLIC_METHODS);
+ hint.onReachableType(PageModule.class);
+ });
+ hints.reflection().registerType(TypeReference.of(
+ "org.springframework.data.web.config.SpringDataJacksonConfiguration$PageModule$PlainPageSerializationWarning"),
+ hint -> {
+ hint.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS, MemberCategory.INVOKE_PUBLIC_METHODS);
+ hint.onReachableType(PageModule.class);
+ });
}
}
}