Browse Source

feat(launchSettings.json): 更新命令行参数以创建新项目并配置数据库连接

📝 docs(README.zh-CN.md): 添加微服务模板的中文文档说明

📝 docs(README.md): 添加微服务模板的英文文档说明
pull/1067/head^2^2
feijie 1 year ago
parent
commit
42e19cf2fa
  1. 3
      aspnet-core/framework/cli/LINGYUN.Abp.Cli/Properties/launchSettings.json
  2. 83
      aspnet-core/templates/content/README.md
  3. 83
      aspnet-core/templates/content/README.zh-CN.md

3
aspnet-core/framework/cli/LINGYUN.Abp.Cli/Properties/launchSettings.json

@ -3,7 +3,8 @@
"LINGYUN.Abp.Cli": {
"commandName": "Project",
//"commandLineArgs": "generate-view -t vben-view -m auditing -o D:\\Projects\\Development\\view-script -url http://127.0.0.1:30000/"
"commandLineArgs": "generate-proxy -t flutter -asp rest-service -u http://127.0.0.1:30000 -m notifications -o D:\\Projects\\Development\\flutter-script -skip-cli-version-check"
// "commandLineArgs": "generate-proxy -t flutter -asp rest-service -u http://127.0.0.1:30000 -m notifications -o D:\\Projects\\Development\\flutter-script -skip-cli-version-check"
"commandLineArgs": "create MyCompanyName.MyProjectName -t lam -pk MyPackageName -o /Users/feijie/Projects/Tests --dbms MySql --cs \"Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None\" --no-random-port"
}
}
}

83
aspnet-core/templates/content/README.md

@ -0,0 +1,83 @@
# LINGYUN.Abp.MicroService.Template
[English](README.md) | [中文](README.zh-CN.md)
## Introduction
LINGYUN.Abp.MicroService.Template is a microservice project template based on ABP Framework. This template provides a complete microservice architecture foundation, including necessary project structure and configurations.
## Features
- Complete microservice project structure
- Integrated authentication
- Database integration (multiple databases supported)
- Unified configuration management
- Distributed event bus support
- Background job processing
## How to Use
### Install Template
```bash
dotnet new install LINGYUN.Abp.MicroService.Template
```
### Create New Project
```bash
labp create YourCompanyName.YourProjectName -pk YourPackageName -o /path/to/output --dbms MySql --cs "Server=127.0.0.1;Database=YourDatabase;User Id=your_user;Password=your_password;SslMode=None" --no-random-port
```
## How to Run
After creating your project, you can run it using the following command:
```bash
dotnet run --launch-profile "YourPackageName.YourCompanyName.YourProjectName.Development"
```
For example:
```bash
dotnet run --launch-profile "LY.MicroService.Applications.Single.Development"
```
## How to Package and Publish
1. Clone the Project
```bash
git clone <repository-url>
cd <repository-path>/aspnet-core/templates/content
```
2. Modify Version
Edit `../PackageName.CompanyName.ProjectName.csproj` file, update PackageVersion:
```xml
<PackageVersion>8.3.0</PackageVersion>
```
3. Execute Packaging Script
```powershell
# Windows PowerShell
.\pack.ps1
# PowerShell Core (Windows/Linux/macOS)
pwsh pack.ps1
```
## Supported Databases
- SqlServer
- MySQL
- PostgreSQL
- Oracle
- SQLite
## Notes
- Ensure .NET SDK 8.0 or higher is installed
- Pay attention to NuGet publish address and key when packaging
- Complete testing is recommended before publishing

83
aspnet-core/templates/content/README.zh-CN.md

@ -0,0 +1,83 @@
# LINGYUN.Abp.MicroService.Template
[English](README.md) | [中文](README.zh-CN.md)
## 简介
LINGYUN.Abp.MicroService.Template 是一个基于 ABP Framework 的微服务项目模板。此模板提供了一个完整的微服务架构基础,包括必要的项目结构和配置。
## 功能特点
- 完整的微服务项目结构
- 集成身份认证
- 数据库集成(支持多种数据库)
- 统一的配置管理
- 分布式事件总线支持
- 后台任务处理
## 如何使用
### 安装模板
```bash
dotnet new install LINGYUN.Abp.MicroService.Template
```
### 创建新项目
```bash
labp create YourCompanyName.YourProjectName -pk YourPackageName -o /path/to/output --dbms MySql --cs "Server=127.0.0.1;Database=YourDatabase;User Id=your_user;Password=your_password;SslMode=None" --no-random-port
```
## 如何运行
创建项目后,您可以使用以下命令运行项目:
```bash
dotnet run --launch-profile "YourPackageName.YourCompanyName.YourProjectName.Development"
```
示例:
```bash
dotnet run --launch-profile "LY.MicroService.Applications.Single.Development"
```
## 如何打包发布
1. 克隆项目
```bash
git clone <repository-url>
cd <repository-path>/aspnet-core/templates/content
```
2. 修改版本号
编辑 `../PackageName.CompanyName.ProjectName.csproj` 文件,更新 PackageVersion:
```xml
<PackageVersion>8.3.0</PackageVersion>
```
3. 执行打包脚本
```powershell
# Windows PowerShell
.\pack.ps1
# PowerShell Core (Windows/Linux/macOS)
pwsh pack.ps1
```
## 支持的数据库
- SqlServer
- MySQL
- PostgreSQL
- Oracle
- SQLite
## 注意事项
- 确保已安装 .NET SDK 8.0 或更高版本
- 打包时注意修改 NuGet 发布地址和密钥
- 建议在发布前进行完整的测试
Loading…
Cancel
Save