feat(app): 引入 uber-go/fx 重构 DI 装配层

This commit is contained in:
lafay
2026-06-15 16:39:45 +08:00
parent a111872b32
commit d9de39a0a3
11 changed files with 348 additions and 158 deletions

View File

@@ -0,0 +1,15 @@
package app
// ServiceModule 已在阶段4移除。
//
// 当前阶段Service 由 internal/container.Container 内部构造Container 聚合了
// 所有 fx 注入的基础设施,在其 NewContainer 方法里创建 Repository 与 Service
//
// TODO(阶段6): 当 Handler 解耦为直接依赖各 Service 接口后Container 将被移除,
// 届时 Service 将回到此 Module 由 fx 直接管理:
//
// var ServiceModule = fx.Options(
// fx.Provide(service.NewUserService),
// fx.Provide(service.NewProfileService),
// ...
// )