From 521992a11e26ae45d75998e811d463a90e35beb0 Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Wed, 6 Oct 2021 17:40:38 +0300 Subject: [PATCH] Fix serialization of Spring Data JPA Page in native mode Initially reported at: https://quarkusio.zulipchat.com/#narrow/stream/187030-users/topic/Spring.20Data.20JPA.20serialization.20issue.20in.20native --- .../data/deployment/SpringDataJPAProcessor.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/extensions/spring-data-jpa/deployment/src/main/java/io/quarkus/spring/data/deployment/SpringDataJPAProcessor.java b/extensions/spring-data-jpa/deployment/src/main/java/io/quarkus/spring/data/deployment/SpringDataJPAProcessor.java index 7ccfbb56485388..7e1723e7170cfd 100644 --- a/extensions/spring-data-jpa/deployment/src/main/java/io/quarkus/spring/data/deployment/SpringDataJPAProcessor.java +++ b/extensions/spring-data-jpa/deployment/src/main/java/io/quarkus/spring/data/deployment/SpringDataJPAProcessor.java @@ -89,6 +89,18 @@ IgnorableNonIndexedClasses ignorable() { return new IgnorableNonIndexedClasses(ignorable); } + @BuildStep + void registerReflection(BuildProducer producer) { + producer.produce(new ReflectiveClassBuildItem(true, false, + "org.springframework.data.domain.Page", + "org.springframework.data.domain.Slice", + "org.springframework.data.domain.PageImpl", + "org.springframework.data.domain.Sort", + "org.springframework.data.domain.Chunk", + "org.springframework.data.domain.PageRequest", + "org.springframework.data.domain.AbstractPageRequest")); + } + @BuildStep void build(CombinedIndexBuildItem index, BuildProducer generatedClasses,