Skip to content

fix(admin): serialize audit-log search via PagedModel (0.4.1)#58

Merged
jlc488 merged 1 commit into
mainfrom
fix/audit-page-pagedmodel
Jun 3, 2026
Merged

fix(admin): serialize audit-log search via PagedModel (0.4.1)#58
jlc488 merged 1 commit into
mainfrom
fix/audit-page-pagedmodel

Conversation

@jlc488

@jlc488 jlc488 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Summary

GET /admin/api/v1/audit-logs returned a raw PageImpl, which Spring Data 4 warns is not a stable serialization:

Serializing PageImpl instances as-is is not supported … For a stable JSON structure, please use Spring Data's PagedModel …

Wrap the result in PagedModel → stable { content, page: { size, number, totalElements, totalPages } } contract, and the warning is gone.

  • Contained to this one endpoint — no global @EnableSpringDataWebSupport, so a consumer app's own pagination is unaffected.
  • The admin-ui already consumes this shape (auditLogs.ts handles content + nested page), so no frontend change.
  • Docs/CHANGELOG + install coordinates bumped to 0.4.1.

Verification

Full suite green locally: 54 tests, 0 failures / 0 errors (./gradlew build, Testcontainers). No test asserted the old shape.


요약 (한국어)

GET /admin/api/v1/audit-logs 가 raw PageImpl 을 반환해 Spring Data 4 가 "안정적 직렬화가 아니다"라고 경고하던 것을 PagedModel 로 감싸 안정적 계약({ content, page:{...} })으로 고칩니다. 경고 사라짐.

  • 이 엔드포인트에만 적용 — 전역 @EnableSpringDataWebSupport 없음 → 소비자 앱 자체 페이징 영향 없음.
  • admin-ui 는 이미 이 shape 처리 → 프론트 변경 없음.
  • 문서/CHANGELOG + 설치 좌표 0.4.1 로 범프.

검증: 로컬 전체 그린 54 tests, 0/0.

GET /admin/api/v1/audit-logs returned a raw PageImpl, which Spring Data 4
warns is not a stable serialization ("Serializing PageImpl instances as-is
is not supported"). Wrap it in PagedModel for a stable
{ content, page: { size, number, totalElements, totalPages } } contract.

Contained to this endpoint — no global @EnableSpringDataWebSupport, so a
consumer's own pagination is unaffected. The admin-ui already consumes this
shape (content + page). Docs/CHANGELOG + install coordinates bumped to 0.4.1.

Full suite green: 54 tests, 0 failures/0 errors.
@jlc488
jlc488 merged commit 9ba3ec2 into main Jun 3, 2026
2 checks passed
@jlc488
jlc488 deleted the fix/audit-page-pagedmodel branch June 3, 2026 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant