P1-3: 手動DIとSpring DIの混在を解消し composition root を明確化する#90
Merged
Conversation
service constructor 内で Clock.systemDefaultZone() や HttpClient を生成していた 混在 DI を解消する。application lifetime の環境依存を composition root で 1 bean に固定し、HttpFetchService は production/test 同一 constructor に統一する。
…の DI を統一する constructor 内 lambda で Readability4J を生成していた経路を、 ReadabilityParser / ReadabilityArticleParser に分離する。production/test で 同一 constructor を使い、短命の Readability4J オブジェクトは adapter 内に残す。
FeedTomlService が reader/writer/planner/executor と Clock を内部生成していた 構造を、feature 単位の FeedTomlConfiguration へ移す。@transactional 境界と Counters の operation local 生成は維持し、test も同一 constructor を使う。
…ition へ移す facade constructor が scanner/planner/executor/cleaner を new していた composition root を ContentCanonicalizationConfiguration に移す。 accumulator や Session など invocation 単位の状態は bean 化しない。
FeedEntryImportService が @service の FeedDocumentService を別途 new し、 FeedEntryImporter も内部生成していた。managed instance を inject し、 Spring 上の bean と実行時 graph を一致させる。
FullTextProbeService が fetcher を new し、Playwright/properties を 不要に受け取っていた。fetcher だけが必要とする依存は ProbeConfiguration へ 閉じ込め、facade は実際に使う collaborator のみを受け取る。
…position にする PR #89 で分割した runtime/navigator/driver/renderer/lifecycle の組み立てを PlaywrightBrowserConfiguration へ移す。facade から buildCollaborators を除去し、 identity 共有と lazy start、SmartLifecycle は facade のみという設計を維持する。
対象 facade の single constructor / @Autowired 禁止と、 service 内での managed collaborator の new 再導入を source scan で固定する。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
P1-3 として、Spring-managed service 内で collaborator を
ew する手動 DI と、Spring constructor injection の混在を解消する。
業務挙動、transaction、Playwright resource lifecycle / stop 順、CLI、DB、TOML semantics は変更しない。
Commits
Test plan