问题: RewardCalculationService 无法解析依赖 - DomainModule 未导入 InfrastructureModule - service clients 使用 useClass 导致创建新实例时缺少依赖 解决方案: 1. DomainModule 导入 InfrastructureModule 2. InfrastructureModule 中: - 先注册具体的 client 类 (ReferralServiceClient, AuthorizationServiceClient) - 然后用 useExisting 提供 token 别名 - 这样确保使用同一个实例,包含所有依赖 参考: leaderboard-service 的修复方案 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| api | ||
| application | ||
| config | ||
| domain | ||
| infrastructure | ||
| shared | ||
| app.module.ts | ||
| main.ts | ||