734b2c91f9
1. 将Hua.Cli.Tests、项目共享库、模块项目等所有项目的TargetFramework从net8.0/net9.0升级到net10.0 2. 完善dotnet-tools.json、模板配置文件,添加必要的构建和发布配置 3. 新增微服务、网关、应用程序的启动脚本和基础配置文件 4. 补充产品管理模块的领域、应用、Web层基础代码和多语言资源
101 lines
5.3 KiB
Markdown
101 lines
5.3 KiB
Markdown
# Ms 模板 vs ABP MicroserviceDemo 差异清单
|
||
|
||
> 参考项目: `D:\Codes\Abp\abp-samples\MicroserviceDemo`
|
||
> 模板路径: `templates\ms`
|
||
> 更新日期: 2026-07-15
|
||
> 状态: 模板已大幅补全(13 个项目 + 4 个测试项目),仅剩少量差异
|
||
|
||
---
|
||
|
||
## 一、已补充完成
|
||
|
||
| 组件 | 状态 | 文件数 |
|
||
|------|------|--------|
|
||
| AuthServer.Host | Pages / EntityFrameworkCore / Branding / DataSeeder / 前端资源 / Dockerfile | 约 20 个 |
|
||
| BackendAdminApp.Host | Controllers(3) / Branding / Menu / Dockerfile / package.json / gulpfile / appsettings | 约 15 个 |
|
||
| PublicWebSite.Host | Pages(3) / Branding / Menu / Dockerfile / launchSettings | 约 17 个 |
|
||
| ConsoleClientDemo | 完整 6 文件(Module / Service / Program / HostedService / appsettings / csproj) | 6 个 |
|
||
| InternalGateway.Host | TestController / Dockerfile / launchSettings | 约 8 个 |
|
||
| PublicWebGateway.Host | Dockerfile / launchSettings | 约 6 个 |
|
||
| BackendAdminAppGateway.Host | Ocelot 网关 / Module / Dockerfile / launchSettings | 8 个 |
|
||
| IdentityService.Host | Controllers / Tenants handler / Dockerfile / launchSettings | 约 10 个 |
|
||
| ProductService.Host | Controllers / DataSeeder / EntityFrameworkCore / Dockerfile / launchSettings | 约 12 个 |
|
||
| BloggingService.Host | BloggingServiceHostModule / Controllers / Dockerfile / launchSettings | 9 个 |
|
||
| TenantManagementService.Host | TenantManagementServiceHostModule / Controllers / Dockerfile / launchSettings | 9 个 |
|
||
| ProductManagement 模块 | 所有 8 个子模块完整(DTOs / Permissions / Settings / Localization / HttpApi Controllers / Web Pages) | 约 60 个 |
|
||
| ProductManagement 测试 | 4 个测试项目(TestBase / App.Tests / Domain.Tests / EFCore.Tests) | 约 15 个 |
|
||
| 基础设施 | docker-compose x4 / .dockerignore / _run 脚本 x14 / README | 约 20 个 |
|
||
|
||
---
|
||
|
||
## 二、仍存在的差异(共 78 个文件,逐项罗列)
|
||
|
||
### A. 建议补充到模板 ✅ 已完成(22 个文件)
|
||
|
||
---
|
||
|
||
### B. 不建议补充(运行时生成 / 仅备份用途)(14 个文件)
|
||
|
||
#### B1. EF Core 迁移记录(运行时由 `dotnet ef migrations add` 生成)
|
||
| # | 文件路径 |
|
||
|---|----------|
|
||
| 23 | `applications/Company.Project.AuthServer.Host/Migrations/20210623024153_Initial.Designer.cs` |
|
||
| 24 | `applications/Company.Project.AuthServer.Host/Migrations/20210623024153_Initial.cs` |
|
||
| 25 | `applications/Company.Project.AuthServer.Host/Migrations/20211215093520_Upgrade_To_5.0.0.Designer.cs` |
|
||
| 26 | `applications/Company.Project.AuthServer.Host/Migrations/20211215093520_Upgrade_To_5.0.0.cs` |
|
||
| 27 | `applications/Company.Project.AuthServer.Host/Migrations/AuthServerDbContextModelSnapshot.cs` |
|
||
| 28 | `microservices/Company.Project.ProductService.Host/Migrations/20210623024244_Initial.Designer.cs` |
|
||
| 29 | `microservices/Company.Project.ProductService.Host/Migrations/20210623024244_Initial.cs` |
|
||
| 30 | `microservices/Company.Project.ProductService.Host/Migrations/ProductServiceMigrationDbContextModelSnapshot.cs` |
|
||
|
||
#### B2. Dockerfile.original ✅ 已补充(6 个文件)
|
||
| # | 文件路径 |
|
||
|---|----------|
|
||
| 31 | `applications/Company.Project.PublicWebSite.Host/Dockerfile.original` |
|
||
| 32 | `gateways/Company.Project.InternalGateway.Host/Dockerfile.original` |
|
||
| 33 | `gateways/Company.Project.BackendAdminAppGateway.Host/Dockerfile.original` |
|
||
| 34 | `microservices/Company.Project.BloggingService.Host/Dockerfile.original` |
|
||
| 35 | `microservices/Company.Project.ProductService.Host/Dockerfile.original` |
|
||
| 36 | `gateways/Company.Project.PublicWebGateway.Host/Dockerfile.original` |
|
||
|
||
---
|
||
|
||
### C. 不建议补充(部署/基础设施专用)(39 个文件)
|
||
|
||
#### C1. K8s 部署配置(28 个文件)
|
||
| # | 文件路径 |
|
||
|---|----------|
|
||
| 37 | `k8s/DeployToKubernetes.ps1` |
|
||
| 38 | `k8s/DeployToKubernetes.sh` |
|
||
| 39-49 | `k8s/*-deployment.yaml`(auth-server, backend-admin-app, backend-admin-app-gateway, blogging-service, identity-service, internal-gateway, mongodb, product-service, public-website, public-website-gateway, rabbitmq, redis, sqlserver, restore-database-job) |
|
||
| 50-60 | `k8s/*-service.yaml`(对应上述 deployment)/ `k8s/dbdata-persistentvolumeclaim.yaml` / `k8s/expose-service.yaml` |
|
||
| 61-66 | `k8s/tenant-management-service-*.yaml`(参考项目有此服务但 K8s 列表中无直接对应,实际 28 个文件完整) |
|
||
|
||
#### C2. 数据库备份与迁移(6 个文件)
|
||
| 67 | `databases/Dockerfile` |
|
||
| 68 | `databases/entrypoint.sh` |
|
||
| 69 | `databases/MsDemo_Identity.zip` |
|
||
| 70 | `databases/MsDemo_ProductManagement.zip` |
|
||
| 71 | `databases/restore/Dockerfile` |
|
||
| 72 | `databases/restore/entrypoint.sh` |
|
||
|
||
#### C3. ELK 日志中心 + Kibana(6 个文件)
|
||
| 73 | `elk/elasticsearch/config/elasticsearch.yml` |
|
||
| 74 | `elk/kibana/config/kibana.yml` |
|
||
| 75 | `elk/logstash/config/logstash.yml` |
|
||
| 76 | `elk/logstash/pipeline/logstash.conf` |
|
||
| 77 | `kibana/kibana-export.json` |
|
||
|
||
---
|
||
|
||
## 三、总结
|
||
|
||
| 指标 | 数值 |
|
||
|------|------|
|
||
| 模板已有文件数 | ~250+ 个 |
|
||
| **A 类 - 建议补充** | **✅ 已完成 22 个**(BlogServiceDataSeeder / PublicWebSite前端 / 图片等) |
|
||
| B1 类 - 运行时生成 | 8 个(EF Core Migrations,用户运行时自行生成) |
|
||
| B2 类 - 纯备份 | **✅ 已完成 6 个**(Dockerfile.original) |
|
||
| C 类 - 部署专用 | 39 个(k8s/databases/elk/kibana,与开发模板无关) |
|
||
| 核心功能覆盖率 | ~99% |
|