refactor(thumbnail): route document access through DocumentService
The Thumbnail trio (ThumbnailService, ThumbnailBackfillService, ThumbnailAsyncRunner) all injected DocumentRepository directly. They now go through three new DocumentService delegations: - findById(UUID): Optional<Document> — no-throw variant for the runner's log-and-skip behaviour on missing documents. - findForThumbnailBackfill() — wraps the existing findByFilePathIsNotNullAndThumbnailKeyIsNull query. - updateThumbnailMetadata(Document) — wraps save() for the post-thumbnail entity update. DocumentService also gains @Lazy on its existing ThumbnailAsyncRunner field to break the new DocumentService ↔ ThumbnailAsyncRunner cycle. lombok.config adds @Lazy to copyableAnnotations so the field annotation reaches the generated constructor parameter. Refs #417 (C6.2 violations #2, #3, #4). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
1
backend/lombok.config
Normal file
1
backend/lombok.config
Normal file
@@ -0,0 +1 @@
|
||||
lombok.copyableAnnotations += org.springframework.context.annotation.Lazy
|
||||
Reference in New Issue
Block a user