At the moment we use PageImpl as return type in our Rest Services. If we only use the Page interface, serialization will not work in native mode. This is because JSON serialization uses reflection to determine the properties of an object. When using Page, only the interface is registered for reflection by Quarkus, so the other properties needed for paging are not accessible in native mode.
In devon4j there were also issues with serializing Page to/from JSON. The solution in devon4j was to configure Jackson accordingly.
https://github.com/devonfw/devon4j/tree/master/modules/json/src/main/java/com/devonfw/module/json/common/base/type
We need to check if there is also a solution for Quarkus so that we can use Page instead of PageImpl.
At the moment we use
PageImplas return type in our Rest Services. If we only use thePageinterface, serialization will not work in native mode. This is because JSON serialization uses reflection to determine the properties of an object. When usingPage, only the interface is registered for reflection by Quarkus, so the other properties needed for paging are not accessible in native mode.In devon4j there were also issues with serializing
Pageto/from JSON. The solution in devon4j was to configure Jackson accordingly.https://github.com/devonfw/devon4j/tree/master/modules/json/src/main/java/com/devonfw/module/json/common/base/type
We need to check if there is also a solution for Quarkus so that we can use
Pageinstead ofPageImpl.