feat(cli): add ms microservice template support

1. 新增`ms`微服务模板,包含共享项目、微服务、网关、应用等完整架构
2. 为`hua new`命令添加`ms`模板选项并更新文档
3. 将模板文件嵌入CLI项目输出目录
4. 实现微服务模板的项目构建逻辑,自动安装并使用dotnet自定义模板创建项目
This commit is contained in:
ShaoHua
2026-07-15 11:30:43 +08:00
parent e639ade569
commit 2a6f5f81b7
60 changed files with 1259 additions and 2 deletions
+3
View File
@@ -70,6 +70,9 @@ hua new <模板名> [选项]
| 模板名 | 描述 | 优先级 |
|---|---|---|
| `app` | 标准分层应用(Application / Application.Contracts / Domain / Domain.Shared / EntityFrameworkCore / Web / HttpApi | P0 |
| `ms` | 微服务解决方案(shared + microservices + gateways + applications + modules | P0 |
模板使用 .NET 自定义模板机制(`.template.config/template.json`),通过 `dotnet new` 引擎创建项目,`sourceName` 自动替换命名空间和项目名。
#### 3.2.2 `hua update` — 更新依赖