修正方法位置

This commit is contained in:
2025-11-08 18:43:46 +08:00
parent 2ad1ae4f40
commit 26df398392
3 changed files with 18 additions and 13 deletions

View File

@@ -43,7 +43,10 @@ func NewApplication(configPath string) (*Application, error) {
if err != nil {
return nil, fmt.Errorf("初始化基础设施失败: %w", err)
}
domain := initDomainServices(ctx, cfg, infra)
domain, err := initDomainServices(ctx, cfg, infra)
if err != nil {
return nil, fmt.Errorf("初始化领域服务失败: %w", err)
}
appServices := initAppServices(ctx, infra, domain)
// 3. 初始化 API 入口点