English| 简体中文
This project is a microservice template based on the ABP Framework and reference form antosubash/AbpMicroservice, to using dotnet new to create microservice project and microservice service template project.
| Name | Version | Download |
|---|---|---|
| Zyknow.Abp.Microservice.Template |
- Microservice Template
- Microservice Service Template
-
Kibana+ElasticsearchDistributed Log Query -
Grafana+rometheusMonitoring Center -
OpenTelemetryJaegerDistributed tracing -
ApolloConfiguration Center -
YarpGateway -
RabbitMQMessage Queue -
MinioDistributed Storage -
TyeSupport -
Blazor ServerWeb App- Use Masa Blazor UI
-
Vue3 QuasarWeb App- Basic Pages
-
AvaloniaStartup Template -
MauiStartup App -
DockerFile -
K8sk8s Template
- install microservice template on dotnet
dotnet new install Zyknow.Abp.Microservice.Template
dotnet new zabp-ms -n YourMicroserviceName-
you better run the command in services folder
dotnet new zabp-ms-s -n YourServiceProjectName
-
copy
YourServiceProjectName\YourServiceProjectName.ps1to services folder and run. that will fix the service folder path,and add service totye.yaml,add to root sln,you can see all code in YourServiceProjectName\YourServiceProjectName.ps1⚠️ ** please save you all data or to submit git。./YourServiceProjectName.ps1
-
after run,you can see like this,and you can delete this script.
(base) PS G:\Mj\MijinLibrary\services> .\MijinLibrary.BookInfoService.ps1
------------------------------------------------------------------
------------------------------------------------------------------
##########################################检查路径##############################################
检查完成
##########################################修改文件夹名##############################################
文件夹已重命名为 book-info。
修改完成
####################################修复替换项目文件名称以及文件和文件夹####################################
ProjectName: BookInfo
slnName: MijinLibrary
替换完成
####################################添加到Root解决方案####################################
找到解决方案文件: G:\Mj\MijinLibrary\MijinLibrary.sln
找到解决方案文件: G:\Mj\MijinLibrary\MijinLibrary.sln
正在添加项目: G:\Mj\MijinLibrary\services\book-info\src\MijinLibrary.BookInfoService.Application\MijinLibrary.BookInfoService.Application.csproj
已将项目“services\book-info\src\MijinLibrary.BookInfoService.Application\MijinLibrary.BookInfoService.Application.csproj”添加到解决方案中。
正在添加项目: G:\Mj\MijinLibrary\services\book-info\src\MijinLibrary.BookInfoService.Application.Contracts\MijinLibrary.BookInfoService.Application.Contracts.csproj
已将项目“services\book-info\src\MijinLibrary.BookInfoService.Application.Contracts\MijinLibrary.BookInfoService.Application.Contracts.csproj”添加到解决方案中。
正在添加项目: G:\Mj\MijinLibrary\services\book-info\src\MijinLibrary.BookInfoService.Domain\MijinLibrary.BookInfoService.Domain.csproj
已将项目“services\book-info\src\MijinLibrary.BookInfoService.Domain\MijinLibrary.BookInfoService.Domain.csproj”添加到解决方案中。
正在添加项目: G:\Mj\MijinLibrary\services\book-info\src\MijinLibrary.BookInfoService.Domain.Shared\MijinLibrary.BookInfoService.Domain.Shared.csproj
已将项目“services\book-info\src\MijinLibrary.BookInfoService.Domain.Shared\MijinLibrary.BookInfoService.Domain.Shared.csproj”添加到解决方案中。
正在添加项目: G:\Mj\MijinLibrary\services\book-info\src\MijinLibrary.BookInfoService.EntityFrameworkCore\MijinLibrary.BookInfoService.EntityFrameworkCore.csproj
已将项目“services\book-info\src\MijinLibrary.BookInfoService.EntityFrameworkCore\MijinLibrary.BookInfoService.EntityFrameworkCore.csproj”添加到解决方案中。
正在添加项目: G:\Mj\MijinLibrary\services\book-info\src\MijinLibrary.BookInfoService.HttpApi\MijinLibrary.BookInfoService.HttpApi.csproj
已将项目“services\book-info\src\MijinLibrary.BookInfoService.HttpApi\MijinLibrary.BookInfoService.HttpApi.csproj”添加到解决方案中。
正在添加项目: G:\Mj\MijinLibrary\services\book-info\src\MijinLibrary.BookInfoService.HttpApi.Client\MijinLibrary.BookInfoService.HttpApi.Client.csproj
已将项目“services\book-info\src\MijinLibrary.BookInfoService.HttpApi.Client\MijinLibrary.BookInfoService.HttpApi.Client.csproj”添加到解决方案中。
正在添加项目: G:\Mj\MijinLibrary\services\book-info\src\MijinLibrary.BookInfoService.HttpApi.Host\MijinLibrary.BookInfoService.HttpApi.Host.csproj
已将项目“services\book-info\src\MijinLibrary.BookInfoService.HttpApi.Host\MijinLibrary.BookInfoService.HttpApi.Host.csproj”添加到解决方案中。
操作完成
###############################修改端口号/添加端口号到网关和Auth Service####################################
请输入该服务的端口号: 51000
已更新文件: G:\Mj\MijinLibrary\services\book-info\src\MijinLibrary.BookInfoService.HttpApi.Host\appsettings.json
已更新文件: G:\Mj\MijinLibrary\services\book-info\src\MijinLibrary.BookInfoService.HttpApi.Host\Properties\launchSettings.json
开始添加端口号到网关和Auth Service
指定的URL已存在于文件: G:\Mj\MijinLibrary\gateways\internal\src\MijinLibrary.InternalGateway\bin\Debug\net7.0\appsettings.json.FullName 中。
已更新文件: G:\Mj\MijinLibrary\gateways\internal\src\MijinLibrary.InternalGateway\appsettings.json.FullName
指定的URL已存在于文件: G:\Mj\MijinLibrary\gateways\web\src\MijinLibrary.WebGateway\bin\Debug\net7.0\appsettings.json.FullName 中。
已更新文件: G:\Mj\MijinLibrary\gateways\web\src\MijinLibrary.WebGateway\appsettings.json.FullName
指定的URL已存在于文件: G:\Mj\MijinLibrary\apps\auth-server\src\MijinLibrary.AuthServer\bin\Debug\net7.0\appsettings.json.FullName 中。
已更新文件: G:\Mj\MijinLibrary\apps\auth-server\src\MijinLibrary.AuthServer\appsettings.json.FullName
操作完成
###############################添加到tye和prometheus.yml####################################
已添加内容到 G:\Mj\MijinLibrary\tye.yaml。
修改prometheus.yml
已添加内容到 G:\Mj\MijinLibrary\etc\prometheus\prometheus.yml。
###############################更新DbMigrator Appsettings.json####################################
指定的ConnectionStrings已存在于 G:\Mj\MijinLibrary\shared\MijinLibrary.DbMigrator\bin\Debug\net7.0\appsettings.json 中。
指定的OpenIddict/Resources已存在于 G:\Mj\MijinLibrary\shared\MijinLibrary.DbMigrator\bin\Debug\net7.0\appsettings.json 中。
已添加ConnectionStrings内容到 G:\Mj\MijinLibrary\shared\MijinLibrary.DbMigrator\appsettings.json。
已添加OpenIddict/Resources内容到 G:\Mj\MijinLibrary\shared\MijinLibrary.DbMigrator\appsettings.json。
操作完成
###############################添加到AppServiceConsts####################################
已添加常量内容到 G:\Mj\MijinLibrary\shared\MijinLibrary.Shared.Definition\AppServiceConsts.cs。
已添加字典内容到 G:\Mj\MijinLibrary\shared\MijinLibrary.Shared.Definition\AppServiceConsts.cs。
操作完成- build you sln and run tye
dotnet build ./run-tye.ps1
dev_up.ps1is lowest environment dependencyup.ps1is full environment dependency
./dev_up.ps1or
./up.ps1you must install ssl certificate in you local machine,otherwise https will report an error
or delete localhost.pfx,run-tye.ps1 will create a new certificate
dotnet buildyou also can use -p to change tye port,like ./run-tye.ps1 -p 8001
./run-tye.ps1or watch run
./run-tye.ps1 --watchYou can check out the full license here
This project is licensed under the terms of the MIT license.