You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
1 year ago | |
|---|---|---|
| .. | ||
| .template.config | 1 year ago | |
| deploy | 1 year ago | |
| host/PackageName.CompanyName.ProjectName.HttpApi.Host | 1 year ago | |
| migrations | 1 year ago | |
| src | 1 year ago | |
| tests | 1 year ago | |
| .gitlab-ci.yml | 1 year ago | |
| Directory.Build.props | 1 year ago | |
| Directory.Packages.props | 1 year ago | |
| NuGet.Config | 1 year ago | |
| PackageName.CompanyName.ProjectName.sln | 1 year ago | |
| README.md | 1 year ago | |
| README.zh-CN.md | 1 year ago | |
| common.props | 1 year ago | |
| configureawait.props | 1 year ago | |
README.md
LINGYUN.Abp.Templates
Introduction
LINGYUN.Abp.Templates provides two types of project templates based on ABP Framework:
- Microservice Template: A complete microservice architecture template with distributed services.
- All-in-One Template: A single-application template that combines all services into one project.
Features
Common Features
- Integrated authentication (IdentityServer4/OpenIddict)
- Database integration (multiple databases supported)
- Unified configuration management
- Distributed event bus support
- Background job processing
Microservice Template Features
- Complete microservice project structure
- Service discovery and registration
- Distributed deployment support
All-in-One Template Features
- Simplified deployment
- Easier maintenance
- Lower resource requirements
How to Use
Install Templates
# Install Microservice Template
dotnet new install LINGYUN.Abp.MicroService.Templates
# Install All-in-One Template
dotnet new install LINGYUN.Abp.AllInOne.Templates
Create New Project
For Microservice Project
# Short name: lam (LINGYUN Abp Microservice)
dotnet new lam -n 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
For All-in-One Project
# Short name: laa (LINGYUN Abp AllInOne)
dotnet new laa -n 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:
For Microservice Project
cd /path/to/output/host/YourPackageName.YourCompanyName.YourProjectName.HttpApi.Host
dotnet run --launch-profile "YourPackageName.YourCompanyName.YourProjectName.Development"
For All-in-One Project
cd /path/to/output/host/YourPackageName.YourCompanyName.YourProjectName.AIO.Host
dotnet run --launch-profile "YourPackageName.YourCompanyName.YourProjectName.Development"
How to Package and Publish
- Clone the Project
git clone <repository-url>
cd <repository-path>/aspnet-core/templates/content
- Modify Version
Edit the project files to update versions:
- For Microservice:
../PackageName.CompanyName.ProjectName.csproj - For All-in-One:
../PackageName.CompanyName.ProjectName.AIO.csproj
- For Microservice:
<Version>8.3.0</Version>
- Execute Packaging Script
# Windows PowerShell
.\pack.ps1
# PowerShell Core (Windows/Linux/macOS)
pwsh pack.ps1
The script will prompt you to choose which template to package:
- Microservice Template
- All-in-One Template
- Both Templates
Supported Databases
- SqlServer
- MySQL
- PostgreSQL
- Oracle
- SQLite
Notes
- Ensure .NET SDK 8.0 or higher is installed
- Choose the appropriate template based on your needs:
- Microservice Template: For large-scale distributed applications
- All-in-One Template: For smaller applications or simpler deployment requirements
- Pay attention to NuGet publish address and key when packaging
- Complete testing is recommended before publishing