@@ -287,6 +287,10 @@ public SecurityAnalysisStatus findStatus(UUID resultUuid) {
287
287
return securityAnalysisResult .get ().getStatus ();
288
288
}
289
289
290
+ private static Page <?> emptyPage (Pageable pageable ) {
291
+ return new PageImpl <>(List .of (), pageable , 0 );
292
+ }
293
+
290
294
@ Transactional (readOnly = true )
291
295
public Page <ContingencyEntity > findContingenciesPage (UUID resultUuid , List <ResourceFilterDTO > resourceFilters , Pageable pageable ) {
292
296
Objects .requireNonNull (resultUuid );
@@ -308,7 +312,8 @@ public Page<ContingencyEntity> findContingenciesPage(UUID resultUuid, List<Resou
308
312
);
309
313
310
314
if (!uuidPage .hasContent ()) {
311
- return Page .empty ();
315
+ // Since springboot 3.2, the return value of Page.empty() is not serializable. See https://github.com/spring-projects/spring-data-commons/issues/2987
316
+ return (Page <ContingencyEntity >) emptyPage (pageable );
312
317
} else {
313
318
List <UUID > uuids = uuidPage .map (ContingencyRepository .EntityUuid ::getUuid ).toList ();
314
319
// Then we fetch the main entities data for each UUID
@@ -341,7 +346,8 @@ public Page<SubjectLimitViolationEntity> findSubjectLimitViolationsPage(UUID res
341
346
);
342
347
343
348
if (!uuidPage .hasContent ()) {
344
- return Page .empty ();
349
+ // Since springboot 3.2, the return value of Page.empty() is not serializable. See https://github.com/spring-projects/spring-data-commons/issues/2987
350
+ return (Page <SubjectLimitViolationEntity >) emptyPage (pageable );
345
351
} else {
346
352
List <UUID > uuids = uuidPage .map (u -> u .getId ()).toList ();
347
353
// Then we fetch the main entities data for each UUID
0 commit comments