875 changed files with 14 additions and 93143 deletions
@ -1,285 +0,0 @@ |
|||
## Ignore Visual Studio temporary files, build results, and |
|||
## files generated by popular Visual Studio add-ons. |
|||
|
|||
# User-specific files |
|||
*.suo |
|||
*.user |
|||
*.userosscache |
|||
*.sln.docstates |
|||
|
|||
# User-specific files (MonoDevelop/Xamarin Studio) |
|||
*.userprefs |
|||
|
|||
# Build results |
|||
[Dd]ebug/ |
|||
[Dd]ebugPublic/ |
|||
[Rr]elease/ |
|||
[Rr]eleases/ |
|||
x64/ |
|||
x86/ |
|||
bld/ |
|||
[Bb]in/ |
|||
[Oo]bj/ |
|||
[Ll]og/ |
|||
|
|||
# Visual Studio 2015 cache/options directory |
|||
.vs/ |
|||
# Uncomment if you have tasks that create the project's static files in wwwroot |
|||
#wwwroot/ |
|||
|
|||
# MSTest test Results |
|||
[Tt]est[Rr]esult*/ |
|||
[Bb]uild[Ll]og.* |
|||
|
|||
# NUNIT |
|||
*.VisualState.xml |
|||
TestResult.xml |
|||
|
|||
# Build Results of an ATL Project |
|||
[Dd]ebugPS/ |
|||
[Rr]eleasePS/ |
|||
dlldata.c |
|||
|
|||
# DNX |
|||
project.lock.json |
|||
artifacts/ |
|||
|
|||
*_i.c |
|||
*_p.c |
|||
*_i.h |
|||
*.ilk |
|||
*.meta |
|||
*.obj |
|||
*.pch |
|||
*.pdb |
|||
*.pgc |
|||
*.pgd |
|||
*.rsp |
|||
*.sbr |
|||
*.tlb |
|||
*.tli |
|||
*.tlh |
|||
*.tmp |
|||
*.tmp_proj |
|||
*.log |
|||
*.vspscc |
|||
*.vssscc |
|||
.builds |
|||
*.pidb |
|||
*.svclog |
|||
*.scc |
|||
|
|||
# Chutzpah Test files |
|||
_Chutzpah* |
|||
|
|||
# Visual C++ cache files |
|||
ipch/ |
|||
*.aps |
|||
*.ncb |
|||
*.opendb |
|||
*.opensdf |
|||
*.sdf |
|||
*.cachefile |
|||
*.VC.db |
|||
*.VC.VC.opendb |
|||
|
|||
# Visual Studio profiler |
|||
*.psess |
|||
*.vsp |
|||
*.vspx |
|||
*.sap |
|||
|
|||
# TFS 2012 Local Workspace |
|||
$tf/ |
|||
|
|||
# Guidance Automation Toolkit |
|||
*.gpState |
|||
|
|||
# ReSharper is a .NET coding add-in |
|||
_ReSharper*/ |
|||
*.[Rr]e[Ss]harper |
|||
*.DotSettings.user |
|||
|
|||
# JustCode is a .NET coding add-in |
|||
.JustCode |
|||
|
|||
# TeamCity is a build add-in |
|||
_TeamCity* |
|||
|
|||
# DotCover is a Code Coverage Tool |
|||
*.dotCover |
|||
|
|||
# NCrunch |
|||
_NCrunch_* |
|||
.*crunch*.local.xml |
|||
nCrunchTemp_* |
|||
|
|||
# MightyMoose |
|||
*.mm.* |
|||
AutoTest.Net/ |
|||
|
|||
# Web workbench (sass) |
|||
.sass-cache/ |
|||
|
|||
# Installshield output folder |
|||
[Ee]xpress/ |
|||
|
|||
# DocProject is a documentation generator add-in |
|||
DocProject/buildhelp/ |
|||
DocProject/Help/*.HxT |
|||
DocProject/Help/*.HxC |
|||
DocProject/Help/*.hhc |
|||
DocProject/Help/*.hhk |
|||
DocProject/Help/*.hhp |
|||
DocProject/Help/Html2 |
|||
DocProject/Help/html |
|||
|
|||
# Click-Once directory |
|||
publish/ |
|||
|
|||
# Publish Web Output |
|||
*.[Pp]ublish.xml |
|||
*.azurePubxml |
|||
# TODO: Comment the next line if you want to checkin your web deploy settings |
|||
# but database connection strings (with potential passwords) will be unencrypted |
|||
*.pubxml |
|||
*.publishproj |
|||
|
|||
# Microsoft Azure Web App publish settings. Comment the next line if you want to |
|||
# checkin your Azure Web App publish settings, but sensitive information contained |
|||
# in these scripts will be unencrypted |
|||
PublishScripts/ |
|||
|
|||
# NuGet Packages |
|||
*.nupkg |
|||
# The packages folder can be ignored because of Package Restore |
|||
**/packages/* |
|||
# except build/, which is used as an MSBuild target. |
|||
!**/packages/build/ |
|||
# Uncomment if necessary however generally it will be regenerated when needed |
|||
#!**/packages/repositories.config |
|||
# NuGet v3's project.json files produces more ignoreable files |
|||
*.nuget.props |
|||
*.nuget.targets |
|||
|
|||
# Microsoft Azure Build Output |
|||
csx/ |
|||
*.build.csdef |
|||
|
|||
# Microsoft Azure Emulator |
|||
ecf/ |
|||
rcf/ |
|||
|
|||
# Windows Store app package directories and files |
|||
AppPackages/ |
|||
BundleArtifacts/ |
|||
Package.StoreAssociation.xml |
|||
_pkginfo.txt |
|||
|
|||
# Visual Studio cache files |
|||
# files ending in .cache can be ignored |
|||
*.[Cc]ache |
|||
# but keep track of directories ending in .cache |
|||
!*.[Cc]ache/ |
|||
|
|||
# Others |
|||
ClientBin/ |
|||
~$* |
|||
*~ |
|||
*.dbmdl |
|||
*.dbproj.schemaview |
|||
*.pfx |
|||
*.publishsettings |
|||
node_modules/ |
|||
orleans.codegen.cs |
|||
|
|||
# Since there are multiple workflows, uncomment next line to ignore bower_components |
|||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) |
|||
#bower_components/ |
|||
|
|||
# RIA/Silverlight projects |
|||
Generated_Code/ |
|||
|
|||
# Backup & report files from converting an old project file |
|||
# to a newer Visual Studio version. Backup files are not needed, |
|||
# because we have git ;-) |
|||
_UpgradeReport_Files/ |
|||
Backup*/ |
|||
UpgradeLog*.XML |
|||
UpgradeLog*.htm |
|||
|
|||
# SQL Server files |
|||
*.mdf |
|||
*.ldf |
|||
|
|||
# Business Intelligence projects |
|||
*.rdl.data |
|||
*.bim.layout |
|||
*.bim_*.settings |
|||
|
|||
# Microsoft Fakes |
|||
FakesAssemblies/ |
|||
|
|||
# GhostDoc plugin setting file |
|||
*.GhostDoc.xml |
|||
|
|||
# Node.js Tools for Visual Studio |
|||
.ntvs_analysis.dat |
|||
|
|||
# Visual Studio 6 build log |
|||
*.plg |
|||
|
|||
# Visual Studio 6 workspace options file |
|||
*.opt |
|||
|
|||
# Visual Studio LightSwitch build output |
|||
**/*.HTMLClient/GeneratedArtifacts |
|||
**/*.DesktopClient/GeneratedArtifacts |
|||
**/*.DesktopClient/ModelManifest.xml |
|||
**/*.Server/GeneratedArtifacts |
|||
**/*.Server/ModelManifest.xml |
|||
_Pvt_Extensions |
|||
|
|||
# Paket dependency manager |
|||
.paket/paket.exe |
|||
paket-files/ |
|||
|
|||
# FAKE - F# Make |
|||
.fake/ |
|||
|
|||
# JetBrains Rider |
|||
.idea/ |
|||
*.sln.iml |
|||
|
|||
# Zzz |
|||
content/src/Zzz.Web/Logs/* |
|||
content/src/Zzz.Web.Host/Logs/* |
|||
content/src/Zzz.IdentityServer/Logs/* |
|||
content/src/Zzz.HttpApi.Host/Logs/* |
|||
content/src/Zzz.HttpApi.Host/Logs/* |
|||
content/src/Zzz.DbMigrator/Logs/* |
|||
/content/aspnetcore/src/Zzz.HttpApi.Host/App_Data |
|||
/aspnet-core/services/src/CompanyName.ProjectName.HttpApi.Host/Logs |
|||
/aspnet-core/services/src/CompanyName.ProjectName.IdentityServer/appsettings.Production.json |
|||
/aspnet-core/services/src/CompanyName.ProjectName.HttpApi.Host/appsettings.Production.json |
|||
/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/appsettings.Production.json |
|||
/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/Logs |
|||
/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/Logs |
|||
/vben271/dist.zip |
|||
/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/publish.zip |
|||
/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/appsettings.Production.json |
|||
/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/publish.zip |
|||
vben271/yarn.lock |
|||
/vben271/_nginx.zip |
|||
/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/logs |
|||
/aspnet-core/services/host/Lion.AbpPro.IdentityServer/Logs |
|||
/aspnet-core/services/host/Lion.AbpPro.IdentityServer/Logs |
|||
/aspnet-core/gateways/Lion.AbpPro.WebGateway/appsettings.Production.json |
|||
/aspnet-core/services/host/Lion.AbpPro.IdentityServer/appsettings.Production.json |
|||
/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.Production.json |
|||
aspnet-core/services/host/Lion.AbpPro.Web.Blazor.Server/Logs/logs.txt |
|||
/nupkgs |
|||
/aspnet-core/Lion.AbpPro.sln.DotSettings |
|||
/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/logs |
|||
/vben271/package-lock.json |
|||
/docs/site |
|||
@ -1,20 +0,0 @@ |
|||
@ECHO off |
|||
cls |
|||
|
|||
ECHO Deleting all BIN and OBJ folders... |
|||
ECHO. |
|||
|
|||
FOR /d /r . %%d in (bin,obj) DO ( |
|||
IF EXIST "%%d" ( |
|||
ECHO %%d | FIND /I "\node_modules\" > Nul && ( |
|||
ECHO.Skipping: %%d |
|||
) || ( |
|||
ECHO.Deleting: %%d |
|||
rd /s/q "%%d" |
|||
) |
|||
) |
|||
) |
|||
|
|||
ECHO. |
|||
ECHO.BIN and OBJ folders have been successfully deleted. Press any key to exit. |
|||
pause > nul |
|||
@ -1,41 +0,0 @@ |
|||
<Project> |
|||
<!-- Lion.AbpPro包--> |
|||
<ItemGroup> |
|||
<PackageReference Update="Lion.AbpPro.Core" Version="MyVersion"/> |
|||
<PackageReference Update="Lion.AbpPro.Shared.Hosting.Microservices" Version="MyVersion"/> |
|||
<PackageReference Update="Lion.AbpPro.Shared.Hosting.Gateways" Version="MyVersion"/> |
|||
|
|||
<PackageReference Update="Lion.AbpPro.BasicManagement.Application" Version="MyVersion"/> |
|||
<PackageReference Update="Lion.AbpPro.BasicManagement.Application.Contracts" Version="MyVersion"/> |
|||
<PackageReference Update="Lion.AbpPro.BasicManagement.Domain" Version="MyVersion"/> |
|||
<PackageReference Update="Lion.AbpPro.BasicManagement.Domain.Shared" Version="MyVersion"/> |
|||
<PackageReference Update="Lion.AbpPro.BasicManagement.EntityFrameworkCore" Version="MyVersion"/> |
|||
<PackageReference Update="Lion.AbpPro.BasicManagement.HttpApi" Version="MyVersion"/> |
|||
<PackageReference Update="Lion.AbpPro.BasicManagement.HttpApi.Client" Version="MyVersion"/> |
|||
|
|||
|
|||
<PackageReference Update="Lion.AbpPro.NotificationManagement.Application" Version="MyVersion"/> |
|||
<PackageReference Update="Lion.AbpPro.NotificationManagement.Application.Contracts" Version="MyVersion"/> |
|||
<PackageReference Update="Lion.AbpPro.NotificationManagement.Domain" Version="MyVersion"/> |
|||
<PackageReference Update="Lion.AbpPro.NotificationManagement.Domain.Shared" Version="MyVersion"/> |
|||
<PackageReference Update="Lion.AbpPro.NotificationManagement.EntityFrameworkCore" Version="MyVersion"/> |
|||
<PackageReference Update="Lion.AbpPro.NotificationManagement.HttpApi" Version="MyVersion"/> |
|||
<PackageReference Update="Lion.AbpPro.NotificationManagement.HttpApi.Client" Version="MyVersion"/> |
|||
|
|||
<PackageReference Update="Lion.AbpPro.DataDictionaryManagement.Application" Version="MyVersion"/> |
|||
<PackageReference Update="Lion.AbpPro.DataDictionaryManagement.Application.Contracts" Version="MyVersion"/> |
|||
<PackageReference Update="Lion.AbpPro.DataDictionaryManagement.Domain" Version="MyVersion"/> |
|||
<PackageReference Update="Lion.AbpPro.DataDictionaryManagement.Domain.Shared" Version="MyVersion"/> |
|||
<PackageReference Update="Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore" Version="MyVersion"/> |
|||
<PackageReference Update="Lion.AbpPro.DataDictionaryManagement.HttpApi" Version="MyVersion"/> |
|||
<PackageReference Update="Lion.AbpPro.DataDictionaryManagement.HttpApi.Client" Version="MyVersion"/> |
|||
|
|||
<PackageReference Update="Lion.AbpPro.LanguageManagement.Application" Version="MyVersion"/> |
|||
<PackageReference Update="Lion.AbpPro.LanguageManagement.Application.Contracts" Version="MyVersion"/> |
|||
<PackageReference Update="Lion.AbpPro.LanguageManagement.Domain" Version="MyVersion"/> |
|||
<PackageReference Update="Lion.AbpPro.LanguageManagement.Domain.Shared" Version="MyVersion"/> |
|||
<PackageReference Update="Lion.AbpPro.LanguageManagement.EntityFrameworkCore" Version="MyVersion"/> |
|||
<PackageReference Update="Lion.AbpPro.LanguageManagement.HttpApi" Version="MyVersion"/> |
|||
<PackageReference Update="Lion.AbpPro.LanguageManagement.HttpApi.Client" Version="MyVersion"/> |
|||
</ItemGroup> |
|||
</Project> |
|||
@ -1,25 +0,0 @@ |
|||
<Project> |
|||
<ItemGroup> |
|||
<PackageReference Update="Microsoft.Extensions.DependencyModel" Version="8.0.0"/> |
|||
<PackageReference Update="Microsoft.Extensions.Diagnostics.HealthChecks" Version="8.0.0"/> |
|||
<PackageReference Update="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.4"/> |
|||
<PackageReference Update="Microsoft.EntityFrameworkCore.Tools" Version="8.0.0"/> |
|||
<PackageReference Update="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="8.0.0"/> |
|||
<PackageReference Update="Microsoft.EntityFrameworkCore.Proxies" Version="8.0.0"/> |
|||
<PackageReference Update="Microsoft.AspNetCore.SignalR.StackExchangeRedis" Version="8.0.0"/> |
|||
<PackageReference Update="Microsoft.Extensions.Caching.StackExchangeRedis" Version="8.0.0"/> |
|||
<PackageReference Update="Microsoft.Extensions.Http.Polly" Version="8.0.0"/> |
|||
<PackageReference Update="Microsoft.EntityFrameworkCore.Abstractions" Version="8.0.0"/> |
|||
<PackageReference Update="Microsoft.Extensions.FileProviders.Embedded" Version="8.0.4"/> |
|||
|
|||
<PackageReference Update="Microsoft.Extensions.Hosting" Version="8.0.0" /> |
|||
<PackageReference Update="Microsoft.Extensions.DependencyInjection" Version="8.0.0" /> |
|||
<PackageReference Update="Microsoft.Extensions.Http" Version="8.0.0"/> |
|||
|
|||
<PackageReference Update="Microsoft.AspNetCore.Mvc.Core" Version="2.2.0"/> |
|||
<PackageReference Update="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0"/> |
|||
<PackageReference Update="Microsoft.CSharp" Version="4.7.0"/> |
|||
<PackageReference Update="Microsoft.CodeAnalysis.CSharp" Version="3.7.0"/> |
|||
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.8.0"/> |
|||
</ItemGroup> |
|||
</Project> |
|||
@ -1,93 +0,0 @@ |
|||
<Project> |
|||
<ItemGroup> |
|||
<PackageReference Update="Volo.Abp.Autofac" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Threading" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Json" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Validation" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Ddd.Domain" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.AutoMapper" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.ObjectMapping" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Identity.AspNetCore" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Caching" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.BlobStoring.Aliyun" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.BackgroundJobs" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Authorization.Abstractions" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.BackgroundJobs.HangFire" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.AspNetCore.SignalR" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.TestBase" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.EntityFrameworkCore.MySQL" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Identity.EntityFrameworkCore" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.BackgroundJobs.EntityFrameworkCore" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.TenantManagement.EntityFrameworkCore" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.FeatureManagement.EntityFrameworkCore" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.AspNetCore.Mvc.Contracts" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Account.Web" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Caching.StackExchangeRedis" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.EntityFrameworkCore.PostgreSql" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.AspNetCore.Serilog" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Swashbuckle" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Ddd.Application" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Ddd.Application.Contracts" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Authorization" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Dapper" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.AspNetCore.Mvc" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Http.Client" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.MongoDB" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.EntityFrameworkCore.Sqlite" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Http.Client.IdentityModel" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.AspNetCore.MultiTenancy" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Account.Application" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Identity.Application" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.PermissionManagement.Application" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.TenantManagement.Application" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.FeatureManagement.Application" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.SettingManagement.Application" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.ObjectExtending" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Account.Application.Contracts" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Identity.Application.Contracts" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.PermissionManagement.Application.Contracts" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.TenantManagement.Application.Contracts" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.FeatureManagement.Application.Contracts" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.SettingManagement.Application.Contracts" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Emailing" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.PermissionManagement.Domain.Identity" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.BackgroundJobs.Domain" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.AuditLogging.Domain" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.TenantManagement.Domain" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.FeatureManagement.Domain" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.SettingManagement.Domain" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Identity.Domain" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Identity.Domain.Shared" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.BackgroundJobs.Domain.Shared" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.AuditLogging.Domain.Shared" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.TenantManagement.Domain.Shared" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.FeatureManagement.Domain.Shared" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.PermissionManagement.Domain.Shared" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.SettingManagement.Domain.Shared" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Account.HttpApi" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Identity.HttpApi" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.PermissionManagement.HttpApi" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.TenantManagement.HttpApi" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.FeatureManagement.HttpApi" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.SettingManagement.HttpApi" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Account.HttpApi.Client" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Identity.HttpApi.Client" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.PermissionManagement.HttpApi.Client" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.TenantManagement.HttpApi.Client" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.FeatureManagement.HttpApi.Client" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.SettingManagement.HttpApi.Client" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.AspNetCore" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Core" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.EntityFrameworkCore" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.AspNetCore.TestBase" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.EventBus" Version="8.3.0"/> |
|||
<PackageReference Update="Volo.Abp.Localization" Version="8.3.0" /> |
|||
</ItemGroup> |
|||
</Project> |
|||
@ -1,95 +0,0 @@ |
|||
<Project> |
|||
|
|||
<Import Project="Directory.Build.Microsoft.targets"/> |
|||
<Import Project="Directory.Build.Volo.targets"/> |
|||
<Import Project="Directory.Build.Lion.targets"/> |
|||
<PropertyGroup> |
|||
<LangVersion>latest</LangVersion> |
|||
<Version>1.0.0</Version> |
|||
<Description>Abp vNext Pro</Description> |
|||
<NoWarn>$(NoWarn);CS1591;CS0436;NU1504</NoWarn> |
|||
<AbpProjectType>app</AbpProjectType> |
|||
<ImplicitUsings>true</ImplicitUsings> |
|||
<Authors>WangJunZzz</Authors> |
|||
<GenerateDocumentationFile>true</GenerateDocumentationFile> |
|||
<RepositoryUrl>https://github.com/WangJunZzz/abp-vnext-pro</RepositoryUrl> |
|||
<PackageIcon>icon.png</PackageIcon> |
|||
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<None Include="$(MSBuildThisFileDirectory)icon.png" Pack="true" PackagePath=""/> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<!-- Ocelot 网关--> |
|||
<PackageReference Update="Ocelot" Version="18.0.0"/> |
|||
<PackageReference Update="Ocelot.Provider.Consul" Version="18.0.0"/> |
|||
<PackageReference Update="Ocelot.Provider.Polly" Version="18.0.0"/> |
|||
|
|||
<!-- FreeSql--> |
|||
<PackageReference Update="FreeSql" Version="3.2.806"/> |
|||
<PackageReference Update="FreeSql.Provider.MysqlConnector" Version="3.2.806"/> |
|||
<PackageReference Update="FreeSql.Provider.Sqlite" Version="3.2.806"/> |
|||
|
|||
<!-- 单元测试包--> |
|||
<PackageReference Update="xunit" Version="2.6.1"/> |
|||
<PackageReference Update="xunit.extensibility.execution" Version="2.6.1"/> |
|||
<PackageReference Update="xunit.runner.visualstudio" Version="2.5.3"/> |
|||
<PackageReference Update="NSubstitute" Version="5.1.0"/> |
|||
<PackageReference Update="Shouldly" Version="4.2.1"/> |
|||
<PackageReference Update="coverlet.collector" Version="6.0.0"/> |
|||
<PackageReference Update="JunitXml.TestLogger" Version="3.0.134"/> |
|||
<PackageReference Update="AutoFixture.Xunit2" Version="4.18.1"/> |
|||
|
|||
<!-- Hangfire 后台任务--> |
|||
<PackageReference Update="Hangfire.Redis.StackExchange" Version="1.9.3"/> |
|||
|
|||
<!-- CAP 分布式事务--> |
|||
<PackageReference Update="DotNetCore.CAP" Version="8.0.0"/> |
|||
<PackageReference Update="DotNetCore.CAP.Dashboard" Version="8.0.0"/> |
|||
<PackageReference Update="DotNetCore.CAP.Mysql" Version="8.0.0"/> |
|||
<PackageReference Update="DotNetCore.CAP.RabbitMQ" Version="8.0.0"/> |
|||
<PackageReference Update="DotNetCore.CAP.InMemoryStorage" Version="8.0.0"/> |
|||
<PackageReference Update="Savorboard.CAP.InMemoryMessageQueue" Version="7.0.0"/> |
|||
|
|||
<!-- Swagger--> |
|||
<PackageReference Update="Swashbuckle.AspNetCore.SwaggerUI" Version="6.5.0"/> |
|||
<PackageReference Update="Swashbuckle.AspNetCore" Version="6.5.0"/> |
|||
<PackageReference Update="Swashbuckle.AspNetCore.Annotations" Version="6.5.0"/> |
|||
|
|||
<!-- Serilog 日志--> |
|||
<PackageReference Update="Serilog" Version="3.1.1"/> |
|||
<PackageReference Update="Serilog.Extensions.Logging" Version="8.0.0"/> |
|||
<PackageReference Update="Serilog.Sinks.Async" Version="1.5.0"/> |
|||
<PackageReference Update="Serilog.Sinks.File" Version="5.0.0"/> |
|||
<PackageReference Update="Serilog.Sinks.Console" Version="5.0.0"/> |
|||
<PackageReference Update="Serilog.AspNetCore" Version="8.0.0"/> |
|||
<PackageReference Update="Serilog.Exceptions" Version="8.4.0"/> |
|||
<PackageReference Update="Serilog.Settings.Configuration" Version="8.0.0"/> |
|||
<PackageReference Update="Serilog.Sinks.Elasticsearch" Version="9.0.3"/> |
|||
|
|||
<!-- Magicodes 导入导出Excel--> |
|||
<PackageReference Update="Magicodes.IE.Excel" Version="2.7.4.5"/> |
|||
<PackageReference Update="Magicodes.IE.Excel.AspNetCore" Version="2.7.4.5"/> |
|||
|
|||
<!-- MiniProfiler 查看接口耗时,sql耗时--> |
|||
<PackageReference Update="MiniProfiler.AspNetCore.Mvc" Version="4.3.8"/> |
|||
<PackageReference Update="MiniProfiler.EntityFrameworkCore" Version="4.3.8"/> |
|||
<PackageReference Update="MiniProfiler.Shared" Version="4.3.8"/> |
|||
|
|||
<!-- Polly 重试机制--> |
|||
<PackageReference Update="Polly" Version="8.2.0"/> |
|||
|
|||
<!-- Octokit 邮件--> |
|||
<PackageReference Update="Octokit" Version="9.0.0"/> |
|||
|
|||
<!-- Humanizer 中文格式包--> |
|||
<PackageReference Update="Humanizer.Core.zh-Hans" Version="2.14.1"/> |
|||
|
|||
<!-- NEST ElasticSearch--> |
|||
<PackageReference Update="NEST" Version="7.17.5"/> |
|||
|
|||
<PackageReference Update="WebApiClientCore" Version="2.1.4" /> |
|||
</ItemGroup> |
|||
</Project> |
|||
@ -1,21 +0,0 @@ |
|||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base |
|||
WORKDIR /app |
|||
EXPOSE 8080 |
|||
EXPOSE 443 |
|||
ENV TZ=Asia/Shanghai |
|||
ENV ASPNETCORE_ENVIRONMENT=Production |
|||
|
|||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build |
|||
WORKDIR /src |
|||
COPY . . |
|||
WORKDIR "/src/host/MyCompanyName.MyProjectName.HttpApi.Host" |
|||
RUN dotnet build "MyCompanyName.MyProjectName.HttpApi.Host.csproj" -c Release -o /app/build |
|||
|
|||
FROM build AS publish |
|||
RUN dotnet publish "MyCompanyName.MyProjectName.HttpApi.Host.csproj" -c Release -o /app/publish /p:UseAppHost=false |
|||
|
|||
FROM base AS final |
|||
WORKDIR /app |
|||
COPY --from=publish /app/publish . |
|||
ENTRYPOINT ["dotnet", "MyCompanyName.MyProjectName.HttpApi.Host.dll"] |
|||
|
|||
@ -1,140 +0,0 @@ |
|||
Microsoft Visual Studio Solution File, Format Version 12.00 |
|||
# Visual Studio Version 17 |
|||
VisualStudioVersion = 17.0.31410.414 |
|||
MinimumVisualStudioVersion = 10.0.40219.1 |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyCompanyName.MyProjectName.Domain", "src\MyCompanyName.MyProjectName.Domain\MyCompanyName.MyProjectName.Domain.csproj", "{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyCompanyName.MyProjectName.Application", "src\MyCompanyName.MyProjectName.Application\MyCompanyName.MyProjectName.Application.csproj", "{1A94A50E-06DC-43C1-80B5-B662820EC3EB}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyCompanyName.MyProjectName.EntityFrameworkCore", "src\MyCompanyName.MyProjectName.EntityFrameworkCore\MyCompanyName.MyProjectName.EntityFrameworkCore.csproj", "{C956DD76-69C8-4A9C-83EA-D17DF83340FD}" |
|||
EndProject |
|||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{CA9AC87F-097E-4F15-8393-4BC07735A5B0}" |
|||
EndProject |
|||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{04DBDB01-70F4-4E06-B468-8F87850B22BE}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyCompanyName.MyProjectName.Application.Tests", "test\MyCompanyName.MyProjectName.Application.Tests\MyCompanyName.MyProjectName.Application.Tests.csproj", "{50B2631D-129C-47B3-A587-029CCD6099BC}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyCompanyName.MyProjectName.Domain.Shared", "src\MyCompanyName.MyProjectName.Domain.Shared\MyCompanyName.MyProjectName.Domain.Shared.csproj", "{42F719ED-8413-4895-B5B4-5AB56079BC66}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyCompanyName.MyProjectName.Application.Contracts", "src\MyCompanyName.MyProjectName.Application.Contracts\MyCompanyName.MyProjectName.Application.Contracts.csproj", "{520659C8-C734-4298-A3DA-B539DB9DFC0B}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyCompanyName.MyProjectName.HttpApi", "src\MyCompanyName.MyProjectName.HttpApi\MyCompanyName.MyProjectName.HttpApi.csproj", "{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyCompanyName.MyProjectName.HttpApi.Client", "src\MyCompanyName.MyProjectName.HttpApi.Client\MyCompanyName.MyProjectName.HttpApi.Client.csproj", "{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyCompanyName.MyProjectName.EntityFrameworkCore.Tests", "test\MyCompanyName.MyProjectName.EntityFrameworkCore.Tests\MyCompanyName.MyProjectName.EntityFrameworkCore.Tests.csproj", "{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyCompanyName.MyProjectName.TestBase", "test\MyCompanyName.MyProjectName.TestBase\MyCompanyName.MyProjectName.TestBase.csproj", "{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyCompanyName.MyProjectName.Domain.Tests", "test\MyCompanyName.MyProjectName.Domain.Tests\MyCompanyName.MyProjectName.Domain.Tests.csproj", "{E512F4D9-9375-480F-A2F6-A46509F9D824}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyCompanyName.MyProjectName.DbMigrator", "src\MyCompanyName.MyProjectName.DbMigrator\MyCompanyName.MyProjectName.DbMigrator.csproj", "{AA94D832-1CCC-4715-95A9-A483F23A1A5D}" |
|||
EndProject |
|||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "0.Solution Items", "0.Solution Items", "{2C4A6DB8-8D9E-42E6-B7C3-1EDB7B3DE22E}" |
|||
ProjectSection(SolutionItems) = preProject |
|||
Directory.Build.Lion.targets = Directory.Build.Lion.targets |
|||
Directory.Build.Microsoft.targets = Directory.Build.Microsoft.targets |
|||
Directory.Build.targets = Directory.Build.targets |
|||
Directory.Build.Volo.targets = Directory.Build.Volo.targets |
|||
global.json = global.json |
|||
EndProjectSection |
|||
EndProject |
|||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "host", "host", "{8C1B8C6C-C518-4290-B070-622CCA6004DA}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyCompanyName.MyProjectName.HttpApi.Host", "host\MyCompanyName.MyProjectName.HttpApi.Host\MyCompanyName.MyProjectName.HttpApi.Host.csproj", "{FB20372D-6C96-4733-9AAC-12522F15CAA6}" |
|||
EndProject |
|||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyCompanyName.MyProjectName.FreeSqlRepository", "src\MyCompanyName.MyProjectName.FreeSqlRepository\MyCompanyName.MyProjectName.FreeSqlRepository.csproj", "{27C7A0E6-4C2E-4AFF-9DE7-1F526DDC0D18}" |
|||
EndProject |
|||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp", "test\MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp\MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp.csproj", "{A5E9AAA7-B3A2-44CC-83B8-7260057185E6}" |
|||
EndProject |
|||
Global |
|||
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
|||
Debug|Any CPU = Debug|Any CPU |
|||
Release|Any CPU = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
|||
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{FB20372D-6C96-4733-9AAC-12522F15CAA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{FB20372D-6C96-4733-9AAC-12522F15CAA6}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{FB20372D-6C96-4733-9AAC-12522F15CAA6}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{FB20372D-6C96-4733-9AAC-12522F15CAA6}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{27C7A0E6-4C2E-4AFF-9DE7-1F526DDC0D18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{27C7A0E6-4C2E-4AFF-9DE7-1F526DDC0D18}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{27C7A0E6-4C2E-4AFF-9DE7-1F526DDC0D18}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{27C7A0E6-4C2E-4AFF-9DE7-1F526DDC0D18}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
{A5E9AAA7-B3A2-44CC-83B8-7260057185E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{A5E9AAA7-B3A2-44CC-83B8-7260057185E6}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{A5E9AAA7-B3A2-44CC-83B8-7260057185E6}.Release|Any CPU.ActiveCfg = Release|Any CPU |
|||
{A5E9AAA7-B3A2-44CC-83B8-7260057185E6}.Release|Any CPU.Build.0 = Release|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(SolutionProperties) = preSolution |
|||
HideSolutionNode = FALSE |
|||
EndGlobalSection |
|||
GlobalSection(NestedProjects) = preSolution |
|||
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{1A94A50E-06DC-43C1-80B5-B662820EC3EB} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{C956DD76-69C8-4A9C-83EA-D17DF83340FD} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{50B2631D-129C-47B3-A587-029CCD6099BC} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} |
|||
{42F719ED-8413-4895-B5B4-5AB56079BC66} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{520659C8-C734-4298-A3DA-B539DB9DFC0B} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} |
|||
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} |
|||
{E512F4D9-9375-480F-A2F6-A46509F9D824} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} |
|||
{AA94D832-1CCC-4715-95A9-A483F23A1A5D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{FB20372D-6C96-4733-9AAC-12522F15CAA6} = {8C1B8C6C-C518-4290-B070-622CCA6004DA} |
|||
{27C7A0E6-4C2E-4AFF-9DE7-1F526DDC0D18} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0} |
|||
{A5E9AAA7-B3A2-44CC-83B8-7260057185E6} = {04DBDB01-70F4-4E06-B468-8F87850B22BE} |
|||
EndGlobalSection |
|||
GlobalSection(ExtensibilityGlobals) = postSolution |
|||
SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F} |
|||
EndGlobalSection |
|||
EndGlobal |
|||
@ -1,7 +0,0 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
|
|||
<configuration> |
|||
<packageSources> |
|||
<add key="nuget" value="https://api.nuget.org/v3/index.json" /> |
|||
</packageSources> |
|||
</configuration> |
|||
@ -1,6 +0,0 @@ |
|||
{ |
|||
"sdk": { |
|||
"version": "8.0.0", |
|||
"rollForward": "latestFeature" |
|||
} |
|||
} |
|||
@ -1,10 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName.Controllers |
|||
{ |
|||
public class HomeController : AbpController |
|||
{ |
|||
public ActionResult Index() |
|||
{ |
|||
return Redirect("/Login"); |
|||
} |
|||
} |
|||
} |
|||
@ -1,23 +0,0 @@ |
|||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 |
|||
|
|||
# 创建目录 |
|||
RUN mkdir /app |
|||
|
|||
COPY publish /app |
|||
|
|||
|
|||
|
|||
# 设置工作目录 |
|||
WORKDIR /app |
|||
|
|||
# 暴露80端口 |
|||
EXPOSE 80 |
|||
# 设置时区 .net6 才有这个问题 |
|||
ENV TZ=Asia/Shanghai |
|||
|
|||
# 设置环境变量 |
|||
ENV ASPNETCORE_ENVIRONMENT=Production |
|||
|
|||
ENTRYPOINT ["dotnet", "MyCompanyName.MyProjectName.HttpApi.Host.dll"] |
|||
|
|||
|
|||
@ -1,21 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName.Extensions.Hangfire; |
|||
|
|||
public class AutoDeleteAfterSuccessAttributer : JobFilterAttribute, IApplyStateFilter |
|||
{ |
|||
private readonly TimeSpan _deleteAfter; |
|||
|
|||
public AutoDeleteAfterSuccessAttributer(TimeSpan timeSpan) |
|||
{ |
|||
_deleteAfter = timeSpan; |
|||
} |
|||
|
|||
public void OnStateApplied(ApplyStateContext context, IWriteOnlyTransaction transaction) |
|||
{ |
|||
context.JobExpirationTimeout = _deleteAfter; |
|||
} |
|||
|
|||
public void OnStateUnapplied(ApplyStateContext context, IWriteOnlyTransaction transaction) |
|||
{ |
|||
|
|||
} |
|||
} |
|||
@ -1,78 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName.Extensions.Hangfire |
|||
{ |
|||
/// <summary>
|
|||
/// Cron类型
|
|||
/// </summary>
|
|||
public static class CronType |
|||
{ |
|||
/// <summary>
|
|||
/// 周期性为分钟的任务
|
|||
/// </summary>
|
|||
/// <param name="interval">执行周期的间隔,默认为每分钟一次</param>
|
|||
/// <returns></returns>
|
|||
public static string Minute(int interval = 1) |
|||
{ |
|||
return "1 0/" + interval.ToString() + " * * * ? "; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 周期性为小时的任务
|
|||
/// </summary>
|
|||
/// <param name="minute">第几分钟开始,默认为第一分钟</param>
|
|||
/// <param name="interval">执行周期的间隔,默认为每小时一次</param>
|
|||
/// <returns></returns>
|
|||
public static string Hour(int minute = 1, int interval = 1) |
|||
{ |
|||
return "1 " + minute + " 0/" + interval.ToString() + " * * ? "; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 周期性为天的任务
|
|||
/// </summary>
|
|||
/// <param name="hour">第几小时开始,默认从1点开始</param>
|
|||
/// <param name="minute">第几分钟开始,默认从第1分钟开始</param>
|
|||
/// <param name="interval">执行周期的间隔,默认为每天一次</param>
|
|||
/// <returns></returns>
|
|||
public static string Day(int hour = 1, int minute = 1, int interval = 1) |
|||
{ |
|||
return "1 " + minute.ToString() + " " + hour.ToString() + " 1/" + interval.ToString() + " * ? "; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 周期性为周的任务
|
|||
/// </summary>
|
|||
/// <param name="dayOfWeek">星期几开始,默认从星期一点开始</param>
|
|||
/// <param name="hour">第几小时开始,默认从1点开始</param>
|
|||
/// <param name="minute">第几分钟开始,默认从第1分钟开始</param>
|
|||
/// <returns></returns>
|
|||
public static string Week(DayOfWeek dayOfWeek = DayOfWeek.Monday, int hour = 1, int minute = 1) |
|||
{ |
|||
return Cron.Weekly(dayOfWeek, hour, minute); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 周期性为月的任务
|
|||
/// </summary>
|
|||
/// <param name="day">几号开始,默认从一号开始</param>
|
|||
/// <param name="hour">第几小时开始,默认从1点开始</param>
|
|||
/// <param name="minute">第几分钟开始,默认从第1分钟开始</param>
|
|||
/// <returns></returns>
|
|||
public static string Month(int day = 1, int hour = 1, int minute = 1) |
|||
{ |
|||
return Cron.Monthly(day, hour, minute); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 周期性为年的任务
|
|||
/// </summary>
|
|||
/// <param name="month">几月开始,默认从一月开始</param>
|
|||
/// <param name="day">几号开始,默认从一号开始</param>
|
|||
/// <param name="hour">第几小时开始,默认从1点开始</param>
|
|||
/// <param name="minute">第几分钟开始,默认从第1分钟开始</param>
|
|||
/// <returns></returns>
|
|||
public static string Year(int month = 1, int day = 1, int hour = 1, int minute = 1) |
|||
{ |
|||
return Cron.Yearly(month, day, hour, minute); |
|||
} |
|||
} |
|||
} |
|||
@ -1,11 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName.Extensions.Hangfire |
|||
{ |
|||
public class CustomHangfireAuthorizeFilter : IDashboardAuthorizationFilter |
|||
{ |
|||
public bool Authorize(DashboardContext context) |
|||
{ |
|||
var _currentUser = context.GetHttpContext().RequestServices.GetRequiredService<ICurrentUser>(); |
|||
return _currentUser.IsAuthenticated; |
|||
} |
|||
} |
|||
} |
|||
@ -1,24 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName.Extensions.Hangfire; |
|||
|
|||
/// <summary>
|
|||
/// 重试最后一次
|
|||
/// </summary>
|
|||
public class JobRetryLastFilter : JobFilterAttribute, IElectStateFilter |
|||
{ |
|||
private int RetryCount { get; } |
|||
|
|||
public JobRetryLastFilter(int retryCount) |
|||
{ |
|||
RetryCount = retryCount; |
|||
} |
|||
|
|||
|
|||
public void OnStateElection(ElectStateContext context) |
|||
{ |
|||
var retryAttempt = context.GetJobParameter<int>("RetryCount"); |
|||
if (RetryCount == retryAttempt) |
|||
{ |
|||
Log.Error("最后一次重试"); |
|||
} |
|||
} |
|||
} |
|||
@ -1,15 +0,0 @@ |
|||
using MyCompanyName.MyProjectName.Jobs; |
|||
|
|||
namespace MyCompanyName.MyProjectName.Extensions.Hangfire |
|||
{ |
|||
public static class RecurringJobsExtensions |
|||
{ |
|||
public static void CreateRecurringJob(this ApplicationInitializationContext context) |
|||
{ |
|||
RecurringJob.AddOrUpdate<TestJob>("测试Job", e => e.ExecuteAsync(), CronType.Minute(1), new RecurringJobOptions() |
|||
{ |
|||
TimeZone = TimeZoneInfo.Local |
|||
}); |
|||
} |
|||
} |
|||
} |
|||
@ -1,65 +0,0 @@ |
|||
// Global using directives
|
|||
|
|||
global using System; |
|||
global using System.Collections.Generic; |
|||
global using System.IO; |
|||
global using System.Linq; |
|||
global using System.Text; |
|||
global using System.Text.RegularExpressions; |
|||
global using System.Threading.Tasks; |
|||
global using Hangfire; |
|||
global using Hangfire.Common; |
|||
global using Hangfire.Dashboard; |
|||
global using Hangfire.States; |
|||
global using Hangfire.Storage; |
|||
global using Lion.AbpPro; |
|||
global using MyCompanyName.MyProjectName.EntityFrameworkCore; |
|||
global using MyCompanyName.MyProjectName.Extensions; |
|||
global using MyCompanyName.MyProjectName.Extensions.Hangfire; |
|||
global using MyCompanyName.MyProjectName.MultiTenancy; |
|||
global using Microsoft.AspNetCore.Authentication.JwtBearer; |
|||
global using Microsoft.AspNetCore.Builder; |
|||
global using Microsoft.AspNetCore.DataProtection; |
|||
global using Microsoft.AspNetCore.Hosting; |
|||
global using Microsoft.AspNetCore.Http; |
|||
global using Microsoft.AspNetCore.Identity; |
|||
global using Microsoft.AspNetCore.Mvc; |
|||
global using Microsoft.AspNetCore.Mvc.Abstractions; |
|||
global using Microsoft.AspNetCore.Mvc.Filters; |
|||
global using Microsoft.Extensions.Configuration; |
|||
global using Microsoft.Extensions.DependencyInjection; |
|||
global using Microsoft.Extensions.Hosting; |
|||
global using Microsoft.Extensions.Localization; |
|||
global using Microsoft.Extensions.Logging; |
|||
global using Microsoft.Extensions.Logging.Abstractions; |
|||
global using Microsoft.Extensions.Options; |
|||
global using Microsoft.IdentityModel.Tokens; |
|||
global using Microsoft.OpenApi.Models; |
|||
global using Serilog; |
|||
global using StackExchange.Redis; |
|||
global using Swagger; |
|||
global using Swashbuckle.AspNetCore.SwaggerUI; |
|||
global using Volo.Abp; |
|||
global using Volo.Abp.Account.Web; |
|||
global using Volo.Abp.AspNetCore.Auditing; |
|||
global using Volo.Abp.AspNetCore.Authentication.JwtBearer; |
|||
global using Volo.Abp.AspNetCore.ExceptionHandling; |
|||
global using Volo.Abp.AspNetCore.Mvc; |
|||
global using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy; |
|||
global using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic; |
|||
global using Volo.Abp.AspNetCore.Serilog; |
|||
global using Volo.Abp.Auditing; |
|||
global using Volo.Abp.Authorization; |
|||
global using Volo.Abp.BackgroundJobs; |
|||
global using Volo.Abp.BackgroundJobs.Hangfire; |
|||
global using Volo.Abp.Caching; |
|||
global using Volo.Abp.Caching.StackExchangeRedis; |
|||
global using Volo.Abp.DependencyInjection; |
|||
global using Volo.Abp.Domain.Entities; |
|||
global using Volo.Abp.ExceptionHandling; |
|||
global using Volo.Abp.Http; |
|||
global using Volo.Abp.Json; |
|||
global using Volo.Abp.Modularity; |
|||
global using Volo.Abp.Users; |
|||
global using Volo.Abp.Validation; |
|||
global using Volo.Abp.MultiTenancy; |
|||
@ -1,65 +0,0 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk.Web"> |
|||
|
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>net8.0</TargetFramework> |
|||
<RootNamespace>MyCompanyName.MyProjectName</RootNamespace> |
|||
<PreserveCompilationReferences>true</PreserveCompilationReferences> |
|||
<UserSecretsId>MyCompanyName.MyProjectName-4681b4fd-151f-4221-84a4-929d86723e4c</UserSecretsId> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
|
|||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer"/> |
|||
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis"/> |
|||
<PackageReference Include="Volo.Abp.Account.Web"/> |
|||
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy"/> |
|||
<PackageReference Include="Volo.Abp.Autofac"/> |
|||
<PackageReference Include="Volo.Abp.Caching.StackExchangeRedis"/> |
|||
<PackageReference Include="Volo.Abp.AspNetCore.Serilog"/> |
|||
<PackageReference Include="Volo.Abp.Swashbuckle"/> |
|||
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer"/> |
|||
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic"/> |
|||
<PackageReference Include="Serilog"/> |
|||
<PackageReference Include="Serilog.AspNetCore"/> |
|||
<PackageReference Include="Serilog.Exceptions"/> |
|||
<PackageReference Include="Serilog.Extensions.Logging"/> |
|||
<PackageReference Include="Serilog.Settings.Configuration"/> |
|||
<PackageReference Include="Serilog.Sinks.Console"/> |
|||
<PackageReference Include="Serilog.Sinks.Elasticsearch"/> |
|||
<PackageReference Include="Serilog.Sinks.File"/> |
|||
<PackageReference Include="Serilog.Sinks.Async"/> |
|||
<PackageReference Include="Hangfire.Redis.StackExchange"/> |
|||
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks"/> |
|||
<PackageReference Include="MiniProfiler.AspNetCore.Mvc"/> |
|||
<PackageReference Include="DotNetCore.CAP.MySql"/> |
|||
<PackageReference Include="DotNetCore.CAP.RabbitMQ"/> |
|||
<PackageReference Include="DotNetCore.CAP.Dashboard"/> |
|||
<PackageReference Include="DotNetCore.CAP.InMemoryStorage"/> |
|||
<PackageReference Include="Savorboard.CAP.InMemoryMessageQueue"/> |
|||
<PackageReference Include="MiniProfiler.AspNetCore.Mvc"/> |
|||
<PackageReference Include="MiniProfiler.EntityFrameworkCore"/> |
|||
<PackageReference Include="MiniProfiler.Shared"/> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\..\..\..\..\aspnet-core\shared\Lion.AbpPro.Shared.Hosting.Microservices\Lion.AbpPro.Shared.Hosting.Microservices.csproj"/> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\..\src\MyCompanyName.MyProjectName.Application\MyCompanyName.MyProjectName.Application.csproj"/> |
|||
<ProjectReference Include="..\..\src\MyCompanyName.MyProjectName.EntityFrameworkCore\MyCompanyName.MyProjectName.EntityFrameworkCore.csproj"/> |
|||
<ProjectReference Include="..\..\src\MyCompanyName.MyProjectName.HttpApi\MyCompanyName.MyProjectName.HttpApi.csproj"/> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<Compile Remove="Logs\**"/> |
|||
<Content Remove="Logs\**"/> |
|||
<EmbeddedResource Remove="Logs\**"/> |
|||
<None Remove="Logs\**"/> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<Content Remove="$(UserProfile)\.nuget\packages\*\*\contentFiles\any\*\*.abppkg*.json"/> |
|||
</ItemGroup> |
|||
</Project> |
|||
@ -1,40 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName |
|||
{ |
|||
public static class MyProjectNameHttpApiHostConst |
|||
{ |
|||
/// <summary>
|
|||
/// 跨域策略名
|
|||
/// </summary>
|
|||
public const string DefaultCorsPolicyName = "Default"; |
|||
|
|||
/// <summary>
|
|||
/// Cookies名称
|
|||
/// </summary>
|
|||
public const string DefaultCookieName = "MyCompanyName.MyProjectName.Http.Api"; |
|||
|
|||
/// <summary>
|
|||
/// SwaggerUi 端点
|
|||
/// </summary>
|
|||
public const string SwaggerUiEndPoint = "/swagger"; |
|||
|
|||
/// <summary>
|
|||
/// Hangfire 端点
|
|||
/// </summary>
|
|||
public const string HangfireDashboardEndPoint = "/hangfire"; |
|||
|
|||
/// <summary>
|
|||
/// CAP 端点
|
|||
/// </summary>
|
|||
public const string CapDashboardEndPoint = "/cap"; |
|||
|
|||
|
|||
public const string MoreEndPoint = "https://doc.cncore.club/"; |
|||
|
|||
|
|||
/// <summary>
|
|||
/// HMiniprofiler端点
|
|||
/// </summary>
|
|||
public const string MiniprofilerEndPoint = "/profiler/results-index"; |
|||
|
|||
} |
|||
} |
|||
@ -1,273 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName; |
|||
|
|||
[DependsOn( |
|||
typeof(MyProjectNameHttpApiModule), |
|||
typeof(AbpProSharedHostingMicroserviceModule), |
|||
typeof(AbpAspNetCoreMvcUiMultiTenancyModule), |
|||
typeof(MyProjectNameEntityFrameworkCoreModule), |
|||
typeof(AbpAspNetCoreAuthenticationJwtBearerModule), |
|||
typeof(AbpAspNetCoreSerilogModule), |
|||
typeof(AbpAccountWebModule), |
|||
typeof(MyProjectNameApplicationModule), |
|||
typeof(AbpAspNetCoreMvcUiBasicThemeModule), |
|||
typeof(AbpCachingStackExchangeRedisModule) |
|||
)] |
|||
public class MyProjectNameHttpApiHostModule : AbpModule |
|||
{ |
|||
|
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
var configuration = context.Services.GetConfiguration(); |
|||
ConfigureCache(context); |
|||
ConfigureSwaggerServices(context); |
|||
ConfigureJwtAuthentication(context, configuration); |
|||
ConfigureMiniProfiler(context); |
|||
ConfigureIdentity(context); |
|||
ConfigureAuditLog(context); |
|||
ConfigurationSignalR(context); |
|||
ConfigurationMultiTenancy(); |
|||
} |
|||
|
|||
public override void OnApplicationInitialization(ApplicationInitializationContext context) |
|||
{ |
|||
var app = context.GetApplicationBuilder(); |
|||
app.UseAbpProRequestLocalization(); |
|||
app.UseCorrelationId(); |
|||
app.UseStaticFiles(); |
|||
app.UseMiniProfiler(); |
|||
app.UseRouting(); |
|||
app.UseCors(MyProjectNameHttpApiHostConst.DefaultCorsPolicyName); |
|||
app.UseAuthentication(); |
|||
|
|||
if (MultiTenancyConsts.IsEnabled) |
|||
{ |
|||
app.UseMultiTenancy(); |
|||
} |
|||
|
|||
app.UseAuthorization(); |
|||
app.UseSwagger(); |
|||
app.UseAbpSwaggerUI(options => |
|||
{ |
|||
options.SwaggerEndpoint("/swagger/MyProjectName/swagger.json", "MyProjectName API"); |
|||
options.DocExpansion(DocExpansion.None); |
|||
options.DefaultModelsExpandDepth(-1); |
|||
}); |
|||
|
|||
app.UseAuditing(); |
|||
app.UseAbpSerilogEnrichers(); |
|||
|
|||
app.UseUnitOfWork(); |
|||
app.UseConfiguredEndpoints(endpoints => { endpoints.MapHealthChecks("/health"); }); |
|||
|
|||
} |
|||
private void ConfigurationSignalR(ServiceConfigurationContext context) |
|||
{ |
|||
var redisConnection = context.Services.GetConfiguration().GetValue<string>("Redis:Configuration"); |
|||
|
|||
if (redisConnection.IsNullOrWhiteSpace()) |
|||
{ |
|||
throw new UserFriendlyException(message: "Redis连接字符串未配置."); |
|||
} |
|||
|
|||
context.Services.AddSignalR().AddStackExchangeRedis(redisConnection, options => { options.Configuration.ChannelPrefix = "Lion.AbpPro"; }); |
|||
} |
|||
/// <summary>
|
|||
/// 配置MiniProfiler
|
|||
/// </summary>
|
|||
private void ConfigureMiniProfiler(ServiceConfigurationContext context) |
|||
{ |
|||
context.Services.AddMiniProfiler(options => options.RouteBasePath = "/profiler").AddEntityFramework(); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 配置JWT
|
|||
/// </summary>
|
|||
private void ConfigureJwtAuthentication(ServiceConfigurationContext context, IConfiguration configuration) |
|||
{ |
|||
context.Services.AddAuthentication(options => |
|||
{ |
|||
options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme; |
|||
options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme; |
|||
}) |
|||
.AddJwtBearer(options => |
|||
{ |
|||
options.TokenValidationParameters = |
|||
new TokenValidationParameters() |
|||
{ |
|||
// 是否开启签名认证
|
|||
ValidateIssuerSigningKey = true, |
|||
ValidateIssuer = true, |
|||
ValidateAudience = true, |
|||
ValidateLifetime = true, |
|||
//ClockSkew = TimeSpan.Zero,
|
|||
ValidIssuer = configuration["Jwt:Issuer"], |
|||
ValidAudience = configuration["Jwt:Audience"], |
|||
IssuerSigningKey = |
|||
new SymmetricSecurityKey( |
|||
Encoding.ASCII.GetBytes(configuration["Jwt:SecurityKey"])) |
|||
}; |
|||
|
|||
options.Events = new JwtBearerEvents |
|||
{ |
|||
OnMessageReceived = currentContext => |
|||
{ |
|||
var path = currentContext.HttpContext.Request.Path; |
|||
if (path.StartsWithSegments("/login")) |
|||
{ |
|||
return Task.CompletedTask; |
|||
} |
|||
|
|||
var accessToken = string.Empty; |
|||
if (currentContext.HttpContext.Request.Headers.ContainsKey("Authorization")) |
|||
{ |
|||
accessToken = currentContext.HttpContext.Request.Headers["Authorization"]; |
|||
if (!string.IsNullOrWhiteSpace(accessToken)) |
|||
{ |
|||
accessToken = accessToken.Split(" ").LastOrDefault(); |
|||
} |
|||
} |
|||
|
|||
if (accessToken.IsNullOrWhiteSpace()) |
|||
{ |
|||
accessToken = currentContext.Request.Query["access_token"].FirstOrDefault(); |
|||
} |
|||
|
|||
if (accessToken.IsNullOrWhiteSpace()) |
|||
{ |
|||
accessToken = currentContext.Request.Cookies[MyProjectNameHttpApiHostConst.DefaultCookieName]; |
|||
} |
|||
|
|||
currentContext.Token = accessToken; |
|||
currentContext.Request.Headers.Remove("Authorization"); |
|||
currentContext.Request.Headers.Add("Authorization", $"Bearer {accessToken}"); |
|||
|
|||
return Task.CompletedTask; |
|||
} |
|||
}; |
|||
}); |
|||
} |
|||
|
|||
|
|||
|
|||
/// <summary>
|
|||
/// Redis缓存
|
|||
/// </summary>
|
|||
private void ConfigureCache(ServiceConfigurationContext context) |
|||
{ |
|||
Configure<AbpDistributedCacheOptions>( |
|||
options => { options.KeyPrefix = "MyProjectName:"; }); |
|||
var configuration = context.Services.GetConfiguration(); |
|||
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]); |
|||
context.Services |
|||
.AddDataProtection() |
|||
.PersistKeysToStackExchangeRedis(redis, "MyProjectName-Protection-Keys"); |
|||
} |
|||
|
|||
|
|||
|
|||
/// <summary>
|
|||
/// 配置Identity
|
|||
/// </summary>
|
|||
private void ConfigureIdentity(ServiceConfigurationContext context) |
|||
{ |
|||
context.Services.Configure<IdentityOptions>(options => { options.Lockout = new LockoutOptions() { AllowedForNewUsers = false }; }); |
|||
} |
|||
|
|||
private static void ConfigureSwaggerServices(ServiceConfigurationContext context) |
|||
{ |
|||
context.Services.AddSwaggerGen( |
|||
options => |
|||
{ |
|||
// 文件下载类型
|
|||
options.MapType<FileContentResult>(() => new OpenApiSchema() { Type = "file" }); |
|||
|
|||
options.SwaggerDoc("MyProjectName", |
|||
new OpenApiInfo { Title = "MyCompanyNameMyProjectName API", Version = "v1" }); |
|||
options.DocInclusionPredicate((docName, description) => true); |
|||
options.EnableAnnotations(); // 启用注解
|
|||
options.DocumentFilter<HiddenAbpDefaultApiFilter>(); |
|||
options.SchemaFilter<EnumSchemaFilter>(); |
|||
// 加载所有xml注释,这里会导致swagger加载有点缓慢
|
|||
var xmlPaths = Directory.GetFiles(AppContext.BaseDirectory, "*.xml"); |
|||
foreach (var xml in xmlPaths) |
|||
{ |
|||
options.IncludeXmlComments(xml, true); |
|||
} |
|||
|
|||
options.AddSecurityDefinition(JwtBearerDefaults.AuthenticationScheme, |
|||
new OpenApiSecurityScheme() |
|||
{ |
|||
Description = "直接在下框输入JWT生成的Token", |
|||
Name = "Authorization", |
|||
In = ParameterLocation.Header, |
|||
Type = SecuritySchemeType.Http, |
|||
Scheme = JwtBearerDefaults.AuthenticationScheme, |
|||
BearerFormat = "JWT" |
|||
}); |
|||
options.AddSecurityRequirement(new OpenApiSecurityRequirement |
|||
{ |
|||
{ |
|||
new OpenApiSecurityScheme |
|||
{ |
|||
Reference = new OpenApiReference |
|||
{ |
|||
Type = ReferenceType.SecurityScheme, Id = "Bearer" |
|||
} |
|||
}, |
|||
new List<string>() |
|||
} |
|||
}); |
|||
|
|||
options.AddSecurityDefinition("ApiKey", new OpenApiSecurityScheme() |
|||
{ |
|||
Type = SecuritySchemeType.ApiKey, |
|||
In = ParameterLocation.Header, |
|||
Name = "Accept-Language", |
|||
Description = "多语言设置,系统预设语言有zh-Hans、en,默认为zh-Hans", |
|||
}); |
|||
|
|||
options.AddSecurityRequirement(new OpenApiSecurityRequirement |
|||
{ |
|||
{ |
|||
new OpenApiSecurityScheme |
|||
{ |
|||
Reference = new OpenApiReference |
|||
{ Type = ReferenceType.SecurityScheme, Id = "ApiKey" } |
|||
}, |
|||
Array.Empty<string>() |
|||
} |
|||
}); |
|||
}); |
|||
} |
|||
|
|||
|
|||
|
|||
/// <summary>
|
|||
/// 审计日志
|
|||
/// </summary>
|
|||
private void ConfigureAuditLog(ServiceConfigurationContext context) |
|||
{ |
|||
Configure<AbpAuditingOptions> |
|||
( |
|||
options => |
|||
{ |
|||
options.IsEnabled = true; |
|||
options.EntityHistorySelectors.AddAllEntities(); |
|||
options.ApplicationName = "MyCompanyName.MyProjectName"; |
|||
} |
|||
); |
|||
|
|||
Configure<AbpAspNetCoreAuditingOptions>( |
|||
options => |
|||
{ |
|||
options.IgnoredUrls.Add("/AuditLogs/page"); |
|||
options.IgnoredUrls.Add("/hangfire/stats"); |
|||
options.IgnoredUrls.Add("/cap"); |
|||
}); |
|||
} |
|||
|
|||
private void ConfigurationMultiTenancy() |
|||
{ |
|||
Configure<AbpMultiTenancyOptions>(options => { options.IsEnabled = MultiTenancyConsts.IsEnabled; }); |
|||
} |
|||
} |
|||
@ -1,158 +0,0 @@ |
|||
@page |
|||
@model MyCompanyName.MyProjectName.Pages.Login |
|||
|
|||
@{ |
|||
Layout = null; |
|||
} |
|||
|
|||
<!DOCTYPE html> |
|||
|
|||
<html> |
|||
<head> |
|||
<title>后台服务登录</title> |
|||
<link href="lib/bootstrap/css/bootstrap.min.css" rel="stylesheet"/> |
|||
</head> |
|||
<body> |
|||
<div class="container"> |
|||
<div class="row"> |
|||
<div class="col-md-offset-3 col-md-6"> |
|||
<form class="form-horizontal" method="post"> |
|||
@Html.AntiForgeryToken() |
|||
<span class="heading">后台服务登录</span> |
|||
<div class="form-group"> |
|||
<input type="text" class="form-control" name="userName" placeholder="用户名"> |
|||
</div> |
|||
<div class="form-group help"> |
|||
<input type="password" class="form-control" name="password" placeholder="密码"> |
|||
</div> |
|||
<div class="form-group"> |
|||
<button type="submit" class="btn btn-default">登录</button> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</body> |
|||
</html> |
|||
<style> |
|||
.row { |
|||
width: 800 px; |
|||
height: auto; |
|||
margin: auto; |
|||
box-sizing: border-box; |
|||
transform: translate(0, 50%); |
|||
} |
|||
.form-horizontal { |
|||
background: #fff; |
|||
padding-bottom: 40px; |
|||
border-radius: 15px; |
|||
text-align: center; |
|||
} |
|||
.form-horizontal .heading { |
|||
display: block; |
|||
font-size: 35px; |
|||
font-weight: 700; |
|||
padding: 35px 0; |
|||
border-bottom: 1px solid #f0f0f0; |
|||
margin-bottom: 30px; |
|||
} |
|||
.form-horizontal .form-group { |
|||
padding: 0 40px; |
|||
margin: 0 0 25px 0; |
|||
position: relative; |
|||
} |
|||
.form-horizontal .form-control { |
|||
background: #f0f0f0; |
|||
border: none; |
|||
border-radius: 20px; |
|||
box-shadow: none; |
|||
padding: 0 20px 0 45px; |
|||
height: 40px; |
|||
transition: all 0.3s ease 0s; |
|||
} |
|||
.form-horizontal .form-control:focus { |
|||
background: #e0e0e0; |
|||
box-shadow: none; |
|||
outline: 0 none; |
|||
} |
|||
.form-horizontal .form-group i { |
|||
position: absolute; |
|||
top: 12px; |
|||
left: 60px; |
|||
font-size: 17px; |
|||
color: #c8c8c8; |
|||
transition: all 0.5s ease 0s; |
|||
} |
|||
.form-horizontal .form-control:focus + i { |
|||
color: #00b4ef; |
|||
} |
|||
.form-horizontal .fa-question-circle { |
|||
display: inline-block; |
|||
position: absolute; |
|||
top: 12px; |
|||
right: 60px; |
|||
font-size: 20px; |
|||
color: #808080; |
|||
transition: all 0.5s ease 0s; |
|||
} |
|||
.form-horizontal .fa-question-circle:hover { |
|||
color: #000; |
|||
} |
|||
.form-horizontal .main-checkbox { |
|||
float: left; |
|||
width: 20px; |
|||
height: 20px; |
|||
background: #11a3fc; |
|||
border-radius: 50%; |
|||
position: relative; |
|||
margin: 5px 0 0 5px; |
|||
border: 1px solid #11a3fc; |
|||
} |
|||
.form-horizontal .main-checkbox label { |
|||
width: 20px; |
|||
height: 20px; |
|||
position: absolute; |
|||
top: 0; |
|||
left: 0; |
|||
cursor: pointer; |
|||
} |
|||
.form-horizontal .main-checkbox label:after { |
|||
content: ""; |
|||
width: 10px; |
|||
height: 5px; |
|||
position: absolute; |
|||
top: 5px; |
|||
left: 4px; |
|||
border: 3px solid #fff; |
|||
border-top: none; |
|||
border-right: none; |
|||
background: transparent; |
|||
opacity: 0; |
|||
-webkit-transform: rotate(-45deg); |
|||
transform: rotate(-45deg); |
|||
} |
|||
.form-horizontal .main-checkbox input[type="checkbox"] { |
|||
visibility: hidden; |
|||
} |
|||
.form-horizontal .main-checkbox input[type="checkbox"]:checked + label:after { |
|||
opacity: 1; |
|||
} |
|||
.form-horizontal .text { |
|||
float: left; |
|||
margin-left: 7px; |
|||
line-height: 20px; |
|||
padding-top: 5px; |
|||
text-transform: capitalize; |
|||
} |
|||
.form-horizontal .btn { |
|||
text-align: center; |
|||
font-size: 14px; |
|||
color: #fff; |
|||
background: #00b4ef; |
|||
border-radius: 30px; |
|||
padding: 10px 25px; |
|||
border: none; |
|||
text-transform: capitalize; |
|||
transition: all 0.5s ease 0s; |
|||
} |
|||
</style> |
|||
@ -1,69 +0,0 @@ |
|||
|
|||
using Lion.AbpPro.BasicManagement.ConfigurationOptions; |
|||
using Lion.AbpPro.BasicManagement.Users; |
|||
using Lion.AbpPro.BasicManagement.Users.Dtos; |
|||
using Microsoft.AspNetCore.Mvc.RazorPages; |
|||
|
|||
|
|||
namespace MyCompanyName.MyProjectName.Pages |
|||
{ |
|||
public class Login : PageModel |
|||
{ |
|||
private readonly IAccountAppService _accountAppService; |
|||
private readonly ILogger<Login> _logger; |
|||
private readonly IHostEnvironment _hostEnvironment; |
|||
private readonly JwtOptions _jwtOptions; |
|||
public Login(IAccountAppService accountAppService, |
|||
ILogger<Login> logger, |
|||
IHostEnvironment hostEnvironment, |
|||
IOptionsSnapshot<JwtOptions> jwtOptions) |
|||
{ |
|||
_accountAppService = accountAppService; |
|||
_logger = logger; |
|||
_hostEnvironment = hostEnvironment; |
|||
_jwtOptions = jwtOptions.Value; |
|||
} |
|||
|
|||
public void OnGet() |
|||
{ |
|||
} |
|||
|
|||
public async Task OnPost() |
|||
{ |
|||
string userName = Request.Form["userName"]; |
|||
string password = Request.Form["password"]; |
|||
if (userName.IsNullOrWhiteSpace() || password.IsNullOrWhiteSpace()) |
|||
{ |
|||
Response.Redirect("/Login"); |
|||
return; |
|||
} |
|||
|
|||
try |
|||
{ |
|||
var options = new CookieOptions |
|||
{ |
|||
Expires = DateTime.Now.AddHours(_jwtOptions.ExpirationTime), |
|||
SameSite = SameSiteMode.Unspecified, |
|||
}; |
|||
|
|||
|
|||
// 设置cookies domain
|
|||
//options.Domain = "MyProjectName.cn";
|
|||
|
|||
|
|||
var result = await _accountAppService.LoginAsync(new LoginInput() |
|||
{ Name = userName, Password = password }); |
|||
Response.Cookies.Append(MyProjectNameHttpApiHostConst.DefaultCookieName, |
|||
result.Token, options); |
|||
} |
|||
catch (Exception e) |
|||
{ |
|||
_logger.LogError($"登录失败:{e.Message}"); |
|||
Response.Redirect("/Login"); |
|||
return; |
|||
} |
|||
|
|||
Response.Redirect("/monitor"); |
|||
} |
|||
} |
|||
} |
|||
@ -1,171 +0,0 @@ |
|||
@page |
|||
@using MyCompanyName.MyProjectName |
|||
@model MyCompanyName.MyProjectName.Pages.Monitor |
|||
|
|||
|
|||
@{ |
|||
Layout = null; |
|||
} |
|||
|
|||
<!DOCTYPE html> |
|||
|
|||
<html lang="en"> |
|||
<head> |
|||
<meta charset="UTF-8"/> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge"/> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> |
|||
<link href="lib/bootstrap/css/bootstrap.min.css" rel="stylesheet"/> |
|||
<title>后端服务</title> |
|||
</head> |
|||
|
|||
<body> |
|||
<div class="container projects"> |
|||
<div class="projects-header page-header"> |
|||
<h2>后端服务列表</h2> |
|||
@* <p>这些项目或者是对Bootstrap进行了有益的补充,或者是基于Bootstrap开发的</p> *@ |
|||
</div> |
|||
<div class="row"> |
|||
<div class="col-sm-6 col-md-4 col-lg-3"> |
|||
<div class="thumbnail" style="height: 180px"> |
|||
<a href="@MyProjectNameHttpApiHostConst.SwaggerUiEndPoint" target="_blank"> |
|||
<img class="lazy" src="/images/swagger.png" width="300" height="150"/> |
|||
</a> |
|||
<div class="caption"> |
|||
<h3> |
|||
<a href="@MyProjectNameHttpApiHostConst.SwaggerUiEndPoint" target="_blank">SwaggerUI</a> |
|||
</h3> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
@* <div class="col-sm-6 col-md-4 col-lg-3"> *@ |
|||
@* <div class="thumbnail" style="height: 180px"> *@ |
|||
@* <a href="@MyProjectNameHttpApiHostConst.HangfireDashboardEndPoint" target="_blank"> *@ |
|||
@* <img class="lazy" src="/images/hangfire.png" width="300" height="150"/> *@ |
|||
@* </a> *@ |
|||
@* <div class="caption"> *@ |
|||
@* <h3> *@ |
|||
@* <a href="@MyProjectNameHttpApiHostConst.HangfireDashboardEndPoint" target="_blank">Hangfire面板</a> *@ |
|||
@* </h3> *@ |
|||
@* </div> *@ |
|||
@* </div> *@ |
|||
@* </div> *@ |
|||
<div class="col-sm-6 col-md-4 col-lg-3"> |
|||
<div class="thumbnail" style="height: 180px"> |
|||
<a href="@MyProjectNameHttpApiHostConst.MiniprofilerEndPoint" target="_blank"> |
|||
<img class="lazy" src="/images/miniprofiler.png" width="300" height="150"/> |
|||
</a> |
|||
<div class="caption"> |
|||
<h3> |
|||
<a href="@MyProjectNameHttpApiHostConst.MiniprofilerEndPoint" target="_blank">Miniprofiler</a> |
|||
</h3> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="col-sm-6 col-md-4 col-lg-3"> |
|||
<div class="thumbnail" style="height: 180px"> |
|||
<a href="@MyProjectNameHttpApiHostConst.MoreEndPoint" target="_blank"> |
|||
<img class="lazy" src="/images/more.png" width="300" height="150"/> |
|||
</a> |
|||
<div class="caption"> |
|||
<h3> |
|||
<a href="@MyProjectNameHttpApiHostConst.MoreEndPoint" target="_blank">了解更多...</a> |
|||
</h3> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</body> |
|||
</html> |
|||
<style> |
|||
*:before, |
|||
*:after { |
|||
-webkit-box-sizing: border-box; |
|||
-moz-box-sizing: border-box; |
|||
box-sizing: border-box; |
|||
} |
|||
.container { |
|||
width: 1170 px; |
|||
padding-right: 15 px; |
|||
padding-left: 15 px; |
|||
margin-right: auto; |
|||
margin-left: auto; |
|||
} |
|||
.projects-header { |
|||
width: 60%; |
|||
text-align: center; |
|||
font-weight: 200; |
|||
display: block; |
|||
margin: 60 px auto 40 px !important; |
|||
} |
|||
.page-header { |
|||
padding-bottom: 9px; |
|||
margin: 40px auto; |
|||
border-bottom: 1 px solid #eee; |
|||
} |
|||
.projects-header h2 { |
|||
font-size: 42px; |
|||
letter-spacing: -1px; |
|||
} |
|||
h2 { |
|||
margin-top: 20 px; |
|||
margin-bottom: 10 px; |
|||
font-weight: 500; |
|||
line-height: 1.1; |
|||
color: inherit; |
|||
/* text-align: center; */ |
|||
} |
|||
p { |
|||
margin: 0 0 10 px; |
|||
} |
|||
.row { |
|||
margin-right: -15 px; |
|||
margin-left: -15 px; |
|||
} |
|||
.col-lg-3 { |
|||
width: 25%; |
|||
} |
|||
.projects .thumbnail { |
|||
display: block; |
|||
margin-right: auto; |
|||
margin-left: auto; |
|||
text-align: center; |
|||
margin-bottom: 30 px; |
|||
border-radius: 0; |
|||
} |
|||
.thumbnail { |
|||
display: block; |
|||
padding: 4px; |
|||
line-height: 1.42857143; |
|||
background-color: #fff; |
|||
border: 1 px solid #ddd; |
|||
.transition(border 0.2s ease-in-out); |
|||
} |
|||
a { |
|||
color: #337ab7; |
|||
text-decoration: none; |
|||
background-color: transparent; |
|||
} |
|||
.projects .thumbnail img { |
|||
max-width: 100%; |
|||
height: auto; |
|||
} |
|||
.thumbnail a > img, |
|||
.thumbnail > img { |
|||
margin-right: auto; |
|||
margin-left: auto; |
|||
} |
|||
img { |
|||
vertical-align: middle; |
|||
} |
|||
/* .projects .thumbnail .caption { |
|||
overflow-y: hidden; |
|||
color: #555; |
|||
} */ |
|||
.caption { |
|||
padding: 9px; |
|||
overflow-y: hidden; |
|||
color: #555; |
|||
} |
|||
</style> |
|||
@ -1,12 +0,0 @@ |
|||
using Microsoft.AspNetCore.Mvc.RazorPages; |
|||
|
|||
namespace MyCompanyName.MyProjectName.Pages |
|||
{ |
|||
public class Monitor : PageModel |
|||
{ |
|||
public void OnGet() |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
|||
@ -1,25 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName |
|||
{ |
|||
public class Program |
|||
{ |
|||
public static void Main(string[] args) |
|||
{ |
|||
CreateHostBuilder(args).Build().Run(); |
|||
|
|||
} |
|||
|
|||
private static IHostBuilder CreateHostBuilder(string[] args) => |
|||
Host.CreateDefaultBuilder(args) |
|||
.ConfigureWebHostDefaults(webBuilder => |
|||
{ |
|||
webBuilder.ConfigureKestrel((context, options) => { options.Limits.MaxRequestBodySize = 1024 * 50; }); |
|||
webBuilder.UseStartup<Startup>(); |
|||
}) |
|||
.UseSerilog((context, loggerConfiguration) => |
|||
{ |
|||
SerilogToEsExtensions.SetSerilogConfiguration( |
|||
loggerConfiguration, |
|||
context.Configuration); |
|||
}).UseAutofac(); |
|||
} |
|||
} |
|||
@ -1,12 +0,0 @@ |
|||
{ |
|||
"profiles": { |
|||
"MyCompanyName.MyProjectName.HttpApi.Host": { |
|||
"commandName": "Project", |
|||
"launchBrowser": true, |
|||
"applicationUrl": "http://localhost:44315", |
|||
"environmentVariables": { |
|||
"ASPNETCORE_ENVIRONMENT": "Development" |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -1,15 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName |
|||
{ |
|||
public class Startup |
|||
{ |
|||
public void ConfigureServices(IServiceCollection services) |
|||
{ |
|||
services.AddApplication<MyProjectNameHttpApiHostModule>(); |
|||
} |
|||
|
|||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory) |
|||
{ |
|||
app.InitializeApplication(); |
|||
} |
|||
} |
|||
} |
|||
@ -1,56 +0,0 @@ |
|||
{ |
|||
"Serilog": { |
|||
"Using": [ |
|||
"Serilog.Sinks.Console", |
|||
"Serilog.Sinks.File" |
|||
], |
|||
"MinimumLevel": { |
|||
"Default": "Debug", |
|||
"Override": { |
|||
"Microsoft": "Information", |
|||
"Volo.Abp": "Information", |
|||
"Hangfire": "Information", |
|||
"DotNetCore.CAP": "Information", |
|||
"Serilog.AspNetCore": "Information", |
|||
"Microsoft.EntityFrameworkCore": "Warning", |
|||
"Microsoft.AspNetCore": "Information" |
|||
} |
|||
}, |
|||
"WriteTo": [ |
|||
{ |
|||
"Name": "Console" |
|||
}, |
|||
{ |
|||
"Name": "File", |
|||
"Args": { |
|||
"path": "logs/logs-.txt", |
|||
"rollingInterval": "Day" |
|||
} |
|||
} |
|||
] |
|||
}, |
|||
"App": { |
|||
"SelfUrl": "http://localhost:44315", |
|||
"CorsOrigins": "https://*.MyProjectName.com,http://localhost:4200,http://localhost:3100,http://localhost:80,http://localhost" |
|||
}, |
|||
"ConnectionStrings": { |
|||
"Default": "Data Source=localhost;Port=3306;Database=MyCompanyNameMyProjectNameDB;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" |
|||
}, |
|||
"Redis": { |
|||
"Configuration": "localhost,password=1q2w3E*,defaultdatabase=1" |
|||
}, |
|||
"Jwt": { |
|||
"Audience": "MyCompanyName.MyProjectName", |
|||
"SecurityKey": "dzehzRz9a8asdfasfdadfasdfasdfafsdadfasbasdf=", |
|||
"Issuer": "MyCompanyName.MyProjectName", |
|||
"ExpirationTime": 2 |
|||
}, |
|||
"ElasticSearch": { |
|||
"Enabled": "false", |
|||
"Url": "http://es.cn", |
|||
"IndexFormat": "MyCompanyName.MyProjectName.development.{0:yyyy.MM.dd}", |
|||
"UserName": "elastic", |
|||
"Password": "aVVhjQ95RP7nbwNy", |
|||
"SearchIndexFormat": "MyCompanyName.MyProjectName.development*" |
|||
} |
|||
} |
|||
@ -1,57 +0,0 @@ |
|||
{ |
|||
"Serilog": { |
|||
"Using": [ |
|||
"Serilog.Sinks.Console", |
|||
"Serilog.Sinks.File" |
|||
], |
|||
"MinimumLevel": { |
|||
"Default": "Debug", |
|||
"Override": { |
|||
"Microsoft": "Information", |
|||
"Volo.Abp": "Information", |
|||
"Hangfire": "Information", |
|||
"DotNetCore.CAP": "Information", |
|||
"Serilog.AspNetCore": "Information", |
|||
"Microsoft.EntityFrameworkCore": "Warning", |
|||
"Microsoft.AspNetCore": "Information" |
|||
} |
|||
}, |
|||
"WriteTo": [ |
|||
{ |
|||
"Name": "Console" |
|||
}, |
|||
{ |
|||
"Name": "File", |
|||
"Args": { |
|||
"path": "logs/logs-.txt", |
|||
"rollingInterval": "Day" |
|||
} |
|||
} |
|||
] |
|||
}, |
|||
"App": { |
|||
"SelfUrl": "http://localhost:44315", |
|||
"CorsOrigins": "https://*.MyProjectName.com,http://localhost:4200,http://localhost:3100" |
|||
}, |
|||
"ConnectionStrings": { |
|||
"Default": "Data Source=localhost;Port=3306;Database=MyCompanyNameMyProjectNameDB;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true", |
|||
"Hangfire": "localhost,password=mypassword,defaultdatabase=2" |
|||
}, |
|||
"Redis": { |
|||
"Configuration": "localhost,password=1q2w3E*,defaultdatabase=1" |
|||
}, |
|||
"Jwt": { |
|||
"Audience": "MyCompanyName.MyProjectName", |
|||
"SecurityKey": "dzehzRz9a8asdfasfdadfasdfasdfafsdadfasbasdf=", |
|||
"Issuer": "MyCompanyName.MyProjectName", |
|||
"ExpirationTime": 2 |
|||
}, |
|||
"ElasticSearch": { |
|||
"Enabled": "false", |
|||
"Url": "http://es.cn", |
|||
"IndexFormat": "MyCompanyName.MyProjectName.development.{0:yyyy.MM.dd}", |
|||
"UserName": "elastic", |
|||
"Password": "aVVhjQ95RP7nbwNy", |
|||
"SearchIndexFormat": "MyCompanyName.MyProjectName.development*" |
|||
} |
|||
} |
|||
@ -1 +0,0 @@ |
|||
{"AdditionalData":{},"Alg":"RS256","Crv":null,"D":"eH-Ld45J684VguyI2jACQEEVGtTx79Nt7ElT20JeUi-pbVnhJxxAJwnAe68d9Q8skpv6BxZs5QuyIORwfGpJK-lKVuo8EtyUQTuUuPmP4o1YK4cv2FIi5xN18tddTltg2JmJi1sN2AD5z-zwm45YNvoFxdQYlnUlA9lJL8QfG0HQLMQX1sv2_lgND8RfRGQBCpVXC2kcap4GvkFVQpKaQ5xaUqvNdH6ftwkGMdFfMRlHGhyYyabIjs4T16HslofvXiHbOCAzk37HtBNNsBpeoQuZul1-G7tAndHe1XtuGvuE-k1fyqdm3YiCU8wK7FpvQU3x6JqvfqmWgMAPnWKOtQ","DP":"hd3I9Nc3LlaZDoPg20JZu48kpv9rMMQ0rLtcZ0UPB_HpZWBC_No-3t3t1HFRbD4iz0MCpCR6gb5q4UsL2N2xh3Q8OhQ1Zrl76UKDZrVKs3oE0VVr9K2VUU3s1sytE4OWSv7PAHYURygcx_MrunMn8Ryd4ZJBQ_g5M2GvpBj1o5M","DQ":"T3ibciK4KxGGHqau9dnWxE6l3fGtcNw1GcjV93Lxe0NKTbfrwPEIFVVAyPsFS8QdmRXEgyunkDFKLHyq2hXBi2fZCwXGoWkUqVUKAKMaNYZaDDd_XeJKOu7mwNY8rgxNETHCyMSnnNNPNabBf2iiXmrBnMwesle2L1kwky42yns","E":"AQAB","K":null,"KeyId":"0D94529E740F5FD50EC6B8A19FF460D6","Kid":"0D94529E740F5FD50EC6B8A19FF460D6","Kty":"RSA","N":"w2jhtWb6a3kH4VqAPfuuvdF5hBh7U6gwMRnddHAH7zaVL6aYwjpCzNW56RQy4W4Zabv1My4Yw9GZpjrOcyr3Bm669eZjn_JC0O00eRTNStNgmg2kB_6AB6ROkEW7br1JC0jKr_dXhOYPBMmR-KHvpwaZXA9R1xOqY02S3JD0KB-TGMSC9q1RlVydt81aMOHFzWVyruLsYGdmcKhRPKDtL6GXpU_DG1gzzOYbk795x_D_UUTOJYuhIDEj7aYi3o32yXLEBvh4Q7HPLjLcWzV-EzCn6Ossl-EVJ2TrR53Eln03R93Vmo63DzQbLIOi3yTcZD2a3O6mpGLiqyZjUducIQ","Oth":null,"P":"y84cEtE6IRBeU2sDJxjDYb50HB4nAF7-bfvbEq0haQL2sFBz-Q-uOUAeXhaS74Gh_IagmW1TzOKblVilijMHCsfOFTWlCljaDoNfdl31enh50HMFvUu8IFjcWiQ9fjR5no8n5-jDeRO5zVfgcWoRHfVTOq4Di7WlVHJRr8FB-R8","Q":"9XRZvvMIvoumlDAVxWZHkb7_an0_dFwBLqc8v74XBZhiK5SLuBqmsJICB5kwNTKzORH7yedx-RXOJWkchJLlEtmH_cQO_6WKQQAyc1PMnLPa0tYkhjotWo8VRE9bAdVmrR0cnJeudfSJ-6gDpUBQYy9g1m8cAfWbTAk3at2_gr8","QI":"xRLXLwhTdNbevlEzANlDDnU9lDeKZWV9-YrvUxHMJBBygBNVqkNFWiee7LNUi82YgTHRn46rpHY9TZf6oQbgk6xa86MyDYXGU2uGO8DHm5oh20Spp7A-RlzZ4JRXAJ3eAYMZHQIP45JApVvKbgHh_pUGjNaiqZKZ9IN6H_L9k1s","Use":null,"X":null,"X5t":null,"X5tS256":null,"X5u":null,"Y":null,"KeySize":2048,"HasPrivateKey":true,"CryptoProviderFactory":{"CryptoProviderCache":{},"CustomCryptoProvider":null,"CacheSignatureProviders":true}} |
|||
@ -1 +0,0 @@ |
|||
{"KeyId":"600caa200caf5d805eba9f06ace9e236","Parameters":{"D":"KCNDHA96eimN+UqchSKocgYITGflaAIwxzCS5KqSTkYAFliPthQx7LySuLor4F1+uLvwnh3ZocyI3y43GZu+eVHD256sxdV8/UsQz1HC23RRFqcUiAZjze8K5VMVStrBOxaa/Ds1U9/bpuNE7jZdcgFIEHsdZtCACqwtlE4nlIs1/GLiokqjBOESgxJMy9WUeDbWcvoo+YdwgKf5jt6AZHOYSS+TokLL+Y7TEfGMXe3jZD9VtSMkBSM8wGB89zNGR0FZB9maCG/BCoRJqxdYRyeb4FFXJclQtK3DexyDVqlNZQaNKVHu0tVAnVNKKcd7Iex8gA+5DNqqucUA7C/F6Q==","DP":"fr9iaNb1W4YZ/NJ56+N3SCeDQYuKobq1qeaQWmHlQsOHKoHhNZJQZ5x0M9PQilou16AwVlNGCJncMwxsSUxXn6itG0LcBnvfMeo2v3xKcij1BtFR9qfXecwEn2nnhI3mpXtZxyCdP3NIYUp9qViLJUjGJqrbQk+OIAGRQd2rRe0=","DQ":"o1umLkDodtwvpCsDguQYSjd3iob+WHNmfe/9HyjADmUehP8b9SpUgcrb+QF301J8YmQMnYZKWW5rEwKOtwsWNswgXfMnXeWerlZmz0tj9y38YczS70liU0vETsRefhrRCaXHraMvneqYNNedhsrCNalWK+DNwcixi4L59vA8ofs=","Exponent":"AQAB","InverseQ":"btd1nwwxl/E3ryfDi2bN12TuVDvv7yoPvryIlLgu+FiLpe4vaA1omDLliQBcl7oeyA563HBUop4D5oE7si+jD64N8XgFz37dD3KqUokeQ4lrTSSOePT1K+nWIl30sqDd7YE4auz4CvSjm2wXmN31+CXW1hp3YWN2972yrUt+R5U=","Modulus":"uwMB6reAVtm/Cq0BRPZ0ozBq6g3wDh2kzqFKBf8I7u8d9p7i5ExLSrOWPupHwPr/IW1VUn2TKHrJ8OnyYhznKIRxqlxj0U3D2GXijz5kfFOoHK+mlfKaDMqweRoS0UzEz58kMlgwUoDraUj6dTHTPCVPo3TqA2ImRw50j6D+jobFrY5321EFvlirZViMPDAgB8Ca7wGCqNBcCxvIPYw1O6WZmcVmjG7umelD3XjcUIQlEbIyAmi/3gXAo7NdPmgOamla6bnSWsy429HfsNpXyCfPBzV3QS3ubpTekWPoPcOVZbWwVPYtFQbhRh8PmWATRx0cV6oePZNZGxGeJl8WYQ==","P":"wplelBfVmiOPmr6iUxtOgIzuvwSqvP6Rqmh8dhaGDiJjU8OqZ0tZhuh0G+xnMLPIHb2fMeg0dqZMJZ5iXaIi1QycYn/JKz1i4cUonJ6IIQeKKf67tvzn/BY0V0N8rJw8hVfzou+/5sRBCbiHtJ2KIN1YJQuWGFFfrZJOJzc95ss=","Q":"9gTGKoDiOdrY8kqIXJ2nMhoeNryAH4q3EUrROJ7simqc28oYlGx24Sco/wOoeB2xxrdcF5JYOlyJ7H2YY/huLvJISaw/wHLPskiKiYQ78tuNwW0ip+5ceB1dSToHcEe3sR30+OeTh0Z4ZKoqthKziFGIt3EhEgiGq1gjZuWB5gM="}} |
|||
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 25 KiB |
File diff suppressed because one or more lines are too long
@ -1,16 +0,0 @@ |
|||
// Global using directives
|
|||
|
|||
global using System; |
|||
global using System.Threading.Tasks; |
|||
global using Lion.AbpPro.BasicManagement; |
|||
global using Lion.AbpPro.DataDictionaryManagement; |
|||
global using Lion.AbpPro.LanguageManagement; |
|||
global using Lion.AbpPro.NotificationManagement; |
|||
global using Volo.Abp.Application.Services; |
|||
global using Volo.Abp.Authorization.Permissions; |
|||
global using Volo.Abp.DependencyInjection; |
|||
global using Volo.Abp.Identity; |
|||
global using Volo.Abp.Localization; |
|||
global using Volo.Abp.Modularity; |
|||
global using Volo.Abp.ObjectExtending; |
|||
global using Volo.Abp.Threading; |
|||
@ -1,11 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName.Jobs |
|||
{ |
|||
public interface IRecurringJob : ITransientDependency |
|||
{ |
|||
/// <summary>
|
|||
/// 执行任务
|
|||
/// </summary>
|
|||
/// <returns></returns>
|
|||
Task ExecuteAsync(); |
|||
} |
|||
} |
|||
@ -1,20 +0,0 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>net8.0</TargetFramework> |
|||
<RootNamespace>MyCompanyName.MyProjectName</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\MyCompanyName.MyProjectName.Domain.Shared\MyCompanyName.MyProjectName.Domain.Shared.csproj"/> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\..\..\..\..\aspnet-core\modules\BasicManagement\src\Lion.AbpPro.BasicManagement.Application.Contracts\Lion.AbpPro.BasicManagement.Application.Contracts.csproj"/> |
|||
<ProjectReference Include="..\..\..\..\..\aspnet-core\modules\NotificationManagement\src\Lion.AbpPro.NotificationManagement.Application.Contracts\Lion.AbpPro.NotificationManagement.Application.Contracts.csproj"/> |
|||
<ProjectReference Include="..\..\..\..\..\aspnet-core\modules\DataDictionaryManagement\src\Lion.AbpPro.DataDictionaryManagement.Application.Contracts\Lion.AbpPro.DataDictionaryManagement.Application.Contracts.csproj"/> |
|||
<ProjectReference Include="..\..\..\..\..\aspnet-core\modules\LanguageManagement\src\Lion.AbpPro.LanguageManagement.Application.Contracts\Lion.AbpPro.LanguageManagement.Application.Contracts.csproj"/> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -1,18 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName |
|||
{ |
|||
[DependsOn( |
|||
typeof(MyProjectNameDomainSharedModule), |
|||
typeof(AbpObjectExtendingModule), |
|||
typeof(BasicManagementApplicationContractsModule), |
|||
typeof(NotificationManagementApplicationContractsModule), |
|||
typeof(DataDictionaryManagementApplicationContractsModule), |
|||
typeof(LanguageManagementApplicationContractsModule) |
|||
)] |
|||
public class MyProjectNameApplicationContractsModule : AbpModule |
|||
{ |
|||
public override void PreConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
MyProjectNameDtoExtensions.Configure(); |
|||
} |
|||
} |
|||
} |
|||
@ -1,25 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName |
|||
{ |
|||
public static class MyProjectNameDtoExtensions |
|||
{ |
|||
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner(); |
|||
|
|||
public static void Configure() |
|||
{ |
|||
OneTimeRunner.Run(() => |
|||
{ |
|||
/* You can add extension properties to DTOs |
|||
* defined in the depended modules. |
|||
* |
|||
* Example: |
|||
* |
|||
* ObjectExtensionManager.Instance |
|||
* .AddOrUpdateProperty<IdentityRoleDto, string>("Title"); |
|||
* |
|||
* See the documentation for more: |
|||
* https://docs.abp.io/en/abp/latest/Object-Extensions
|
|||
*/ |
|||
}); |
|||
} |
|||
} |
|||
} |
|||
@ -1,17 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName.Permissions |
|||
{ |
|||
public class MyProjectNamePermissionDefinitionProvider : PermissionDefinitionProvider |
|||
{ |
|||
public override void Define(IPermissionDefinitionContext context) |
|||
{ |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
private static LocalizableString L(string name) |
|||
{ |
|||
return LocalizableString.Create<MyProjectNameResource>(name); |
|||
} |
|||
} |
|||
} |
|||
@ -1,7 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName.Permissions |
|||
{ |
|||
public static class MyProjectNamePermissions |
|||
{ |
|||
|
|||
} |
|||
} |
|||
@ -1,20 +0,0 @@ |
|||
// Global using directives
|
|||
|
|||
global using System; |
|||
global using System.Collections.Generic; |
|||
global using System.Linq; |
|||
global using System.Threading.Tasks; |
|||
global using Lion.AbpPro.BasicManagement; |
|||
global using Lion.AbpPro.DataDictionaryManagement; |
|||
global using Lion.AbpPro.LanguageManagement; |
|||
global using Lion.AbpPro.NotificationManagement; |
|||
global using MyCompanyName.MyProjectName.FreeSqlRepository; |
|||
global using MyCompanyName.MyProjectName.Permissions; |
|||
global using Microsoft.AspNetCore.Authorization; |
|||
global using Microsoft.Extensions.Configuration; |
|||
global using Volo.Abp.Application.Services; |
|||
global using Volo.Abp.AutoMapper; |
|||
global using Volo.Abp.BackgroundJobs.Hangfire; |
|||
global using Volo.Abp.DependencyInjection; |
|||
global using Volo.Abp.Modularity; |
|||
global using Profile = AutoMapper.Profile; |
|||
@ -1,11 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName.Jobs |
|||
{ |
|||
public class TestJob : IRecurringJob |
|||
{ |
|||
public Task ExecuteAsync() |
|||
{ |
|||
Console.WriteLine($"job 测试- {DateTime.Now}"); |
|||
return Task.CompletedTask; |
|||
} |
|||
} |
|||
} |
|||
@ -1,27 +0,0 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>net8.0</TargetFramework> |
|||
<RootNamespace>MyCompanyName.MyProjectName</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
|
|||
<ProjectReference Include="..\MyCompanyName.MyProjectName.Domain\MyCompanyName.MyProjectName.Domain.csproj"/> |
|||
<ProjectReference Include="..\MyCompanyName.MyProjectName.Application.Contracts\MyCompanyName.MyProjectName.Application.Contracts.csproj"/> |
|||
<ProjectReference Include="..\MyCompanyName.MyProjectName.FreeSqlRepository\MyCompanyName.MyProjectName.FreeSqlRepository.csproj"/> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Volo.Abp.BackgroundJobs.HangFire"/> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\..\..\..\..\aspnet-core\modules\BasicManagement\src\Lion.AbpPro.BasicManagement.Application\Lion.AbpPro.BasicManagement.Application.csproj"/> |
|||
<ProjectReference Include="..\..\..\..\..\aspnet-core\modules\NotificationManagement\src\Lion.AbpPro.NotificationManagement.Application\Lion.AbpPro.NotificationManagement.Application.csproj"/> |
|||
<ProjectReference Include="..\..\..\..\..\aspnet-core\modules\DataDictionaryManagement\src\Lion.AbpPro.DataDictionaryManagement.Application\Lion.AbpPro.DataDictionaryManagement.Application.csproj"/> |
|||
<ProjectReference Include="..\..\..\..\..\aspnet-core\modules\LanguageManagement\src\Lion.AbpPro.LanguageManagement.Application\Lion.AbpPro.LanguageManagement.Application.csproj"/> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -1,12 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName |
|||
{ |
|||
/* Inherit your application services from this class. |
|||
*/ |
|||
public abstract class MyProjectNameAppService : ApplicationService |
|||
{ |
|||
protected MyProjectNameAppService() |
|||
{ |
|||
LocalizationResource = typeof(MyProjectNameResource); |
|||
} |
|||
} |
|||
} |
|||
@ -1,10 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName |
|||
{ |
|||
public class MyProjectNameApplicationAutoMapperProfile : Profile |
|||
{ |
|||
public MyProjectNameApplicationAutoMapperProfile() |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
|||
@ -1,24 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName |
|||
{ |
|||
[DependsOn( |
|||
typeof(MyProjectNameDomainModule), |
|||
typeof(MyProjectNameApplicationContractsModule), |
|||
typeof(BasicManagementApplicationModule), |
|||
typeof(NotificationManagementApplicationModule), |
|||
typeof(DataDictionaryManagementApplicationModule), |
|||
typeof(LanguageManagementApplicationModule), |
|||
typeof(NotificationManagementApplicationModule), |
|||
typeof(MyProjectNameFreeSqlModule) |
|||
)] |
|||
public class MyProjectNameApplicationModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
Configure<AbpAutoMapperOptions>(options => |
|||
{ |
|||
options.AddMaps<MyProjectNameApplicationModule>(); |
|||
}); |
|||
|
|||
} |
|||
} |
|||
} |
|||
@ -1,2 +0,0 @@ |
|||
using System.Runtime.CompilerServices; |
|||
[assembly:InternalsVisibleToAttribute("MyCompanyName.MyProjectName.Application.Tests")] |
|||
@ -1,47 +0,0 @@ |
|||
using Volo.Abp.Data; |
|||
|
|||
namespace MyCompanyName.MyProjectName.DbMigrator |
|||
{ |
|||
public class DbMigratorHostedService : IHostedService |
|||
{ |
|||
private readonly IHostApplicationLifetime _hostApplicationLifetime; |
|||
private readonly IConfiguration _configuration; |
|||
private readonly IHostEnvironment _hostEnvironment; |
|||
public DbMigratorHostedService(IHostApplicationLifetime hostApplicationLifetime, |
|||
IConfiguration configuration, IHostEnvironment hostEnvironment) |
|||
{ |
|||
_hostApplicationLifetime = hostApplicationLifetime; |
|||
_configuration = configuration; |
|||
_hostEnvironment = hostEnvironment; |
|||
} |
|||
|
|||
public async Task StartAsync(CancellationToken cancellationToken) |
|||
{ |
|||
using (var application = await AbpApplicationFactory.CreateAsync<MyProjectNameDbMigratorModule>(options => |
|||
{ |
|||
options.Services.ReplaceConfiguration(_configuration); |
|||
options.UseAutofac(); |
|||
options.Services.AddLogging(c => c.AddSerilog()); |
|||
// https://github.com/abpframework/abp/pull/15208
|
|||
options.AddDataMigrationEnvironment(); |
|||
})) |
|||
{ |
|||
await application.InitializeAsync(); |
|||
var conn = _configuration.GetValue<string>("ConnectionStrings:Default"); |
|||
Console.WriteLine("ConnectionStrings:" + conn); |
|||
var s = _hostEnvironment.EnvironmentName; |
|||
Console.WriteLine("EnvironmentName:" + s); |
|||
await application |
|||
.ServiceProvider |
|||
.GetRequiredService<MyProjectNameDbMigrationService>() |
|||
.MigrateAsync(); |
|||
|
|||
await application.ShutdownAsync(); |
|||
|
|||
_hostApplicationLifetime.StopApplication(); |
|||
} |
|||
} |
|||
|
|||
public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask; |
|||
} |
|||
} |
|||
@ -1,19 +0,0 @@ |
|||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 |
|||
|
|||
# 创建目录 |
|||
RUN mkdir /app |
|||
|
|||
COPY publish /app |
|||
|
|||
# 设置工作目录 |
|||
WORKDIR /app |
|||
|
|||
# 设置时区 .net6 才有这个问题 |
|||
ENV TZ=Asia/Shanghai |
|||
|
|||
# 设置环境变量 |
|||
ENV ASPNETCORE_ENVIRONMENT=Production |
|||
|
|||
ENTRYPOINT ["dotnet", "MyCompanyName.MyProjectName.DbMigrator.dll"] |
|||
|
|||
|
|||
@ -1,19 +0,0 @@ |
|||
// Global using directives
|
|||
|
|||
global using System; |
|||
global using System.IO; |
|||
global using System.Threading; |
|||
global using System.Threading.Tasks; |
|||
global using MyCompanyName.MyProjectName.Data; |
|||
global using MyCompanyName.MyProjectName.EntityFrameworkCore; |
|||
global using Microsoft.Extensions.Configuration; |
|||
global using Microsoft.Extensions.DependencyInjection; |
|||
global using Microsoft.Extensions.Hosting; |
|||
global using Microsoft.Extensions.Logging; |
|||
global using Serilog; |
|||
global using Serilog.Events; |
|||
global using Volo.Abp; |
|||
global using Volo.Abp.Autofac; |
|||
global using Volo.Abp.BackgroundJobs; |
|||
global using Volo.Abp.Localization; |
|||
global using Volo.Abp.Modularity; |
|||
@ -1,34 +0,0 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
|
|||
<PropertyGroup> |
|||
<OutputType>Exe</OutputType> |
|||
<TargetFramework>net8.0</TargetFramework> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<PackageReference Include="Serilog.Extensions.Logging"/> |
|||
<PackageReference Include="Serilog.Sinks.Async"/> |
|||
<PackageReference Include="Serilog.Sinks.File"/> |
|||
<PackageReference Include="Serilog.Sinks.Console"/> |
|||
<PackageReference Include="Volo.Abp.Autofac"/> |
|||
<PackageReference Include="Microsoft.Extensions.Hosting"/> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
|
|||
<ProjectReference Include="..\MyCompanyName.MyProjectName.Application.Contracts\MyCompanyName.MyProjectName.Application.Contracts.csproj"/> |
|||
<ProjectReference Include="..\MyCompanyName.MyProjectName.EntityFrameworkCore\MyCompanyName.MyProjectName.EntityFrameworkCore.csproj"/> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<Compile Remove="Logs\**"/> |
|||
<Content Remove="Logs\**"/> |
|||
<EmbeddedResource Remove="Logs\**"/> |
|||
<None Remove="Logs\**"/> |
|||
<None Update="appsettings.json"> |
|||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> |
|||
</None> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -1,39 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName.DbMigrator |
|||
{ |
|||
[DependsOn( |
|||
typeof(AbpAutofacModule), |
|||
typeof(MyProjectNameEntityFrameworkCoreModule), |
|||
typeof(MyProjectNameApplicationContractsModule) |
|||
)] |
|||
public class MyProjectNameDbMigratorModule : AbpModule |
|||
{ |
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
Configure<AbpBackgroundJobOptions>(options => options.IsJobExecutionEnabled = false); |
|||
ConfigureLocalization(); |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// 多语言配置
|
|||
/// </summary>
|
|||
private void ConfigureLocalization() |
|||
{ |
|||
Configure<AbpLocalizationOptions>(options => |
|||
{ |
|||
options.Languages.Add(new LanguageInfo("ar", "ar", "العربية")); |
|||
options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); |
|||
options.Languages.Add(new LanguageInfo("en", "en", "English")); |
|||
options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)")); |
|||
options.Languages.Add(new LanguageInfo("fr", "fr", "Français")); |
|||
options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); |
|||
options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); |
|||
options.Languages.Add(new LanguageInfo("ru", "ru", "Русский")); |
|||
options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); |
|||
options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); |
|||
options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文")); |
|||
options.Languages.Add(new LanguageInfo("de-DE", "de-DE", "Deutsch")); |
|||
options.Languages.Add(new LanguageInfo("es", "es", "Español")); |
|||
}); |
|||
} |
|||
} |
|||
} |
|||
@ -1,45 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName.DbMigrator |
|||
{ |
|||
class Program |
|||
{ |
|||
static async Task Main(string[] args) |
|||
{ |
|||
Log.Logger = new LoggerConfiguration() |
|||
.MinimumLevel.Information() |
|||
.MinimumLevel.Override("Microsoft", LogEventLevel.Warning) |
|||
.MinimumLevel.Override("Volo.Abp", LogEventLevel.Warning) |
|||
#if DEBUG
|
|||
.MinimumLevel.Override("MyCompanyName.MyProjectName", LogEventLevel.Debug) |
|||
#else
|
|||
.MinimumLevel.Override("MyCompanyName.MyProjectName", LogEventLevel.Information) |
|||
#endif
|
|||
.Enrich.FromLogContext() |
|||
.WriteTo.Async(c => c.File("Logs/logs.txt")) |
|||
.WriteTo.Async(c => c.Console()) |
|||
.CreateLogger(); |
|||
|
|||
await CreateHostBuilder(args).RunConsoleAsync(); |
|||
} |
|||
|
|||
public static IHostBuilder CreateHostBuilder(string[] args) => |
|||
Host.CreateDefaultBuilder(args) |
|||
.ConfigureLogging((context, logging) => logging.ClearProviders()) |
|||
.ConfigureAppConfiguration |
|||
( |
|||
otpions => |
|||
{ |
|||
var environment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT"); |
|||
|
|||
var appSettingFileName = "appsettings.json"; |
|||
if (!environment.IsNullOrWhiteSpace()) |
|||
appSettingFileName = $"appsettings.{environment}.json"; |
|||
|
|||
otpions.AddJsonFile(appSettingFileName, optional: true); |
|||
} |
|||
) |
|||
.ConfigureServices((hostContext, services) => |
|||
{ |
|||
services.AddHostedService<DbMigratorHostedService>(); |
|||
}); |
|||
} |
|||
} |
|||
@ -1,5 +0,0 @@ |
|||
{ |
|||
"ConnectionStrings": { |
|||
"Default": "Data Source=localhost;Port=3306;Database=MyCompanyNameMyProjectNameDB;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" |
|||
} |
|||
} |
|||
@ -1,13 +0,0 @@ |
|||
{ |
|||
"KeyId": "f788zGVUZh9H-HbWL1S-Mg", |
|||
"Parameters": { |
|||
"D": "F19hbC5PLO872DszGiJnVoU55ee7XGXmNf0KEKndJ/uGBv5lWklXA0QF80h1ytWXde0jV5isQPB1t7mPhRQlDoDTkywLi1CeOgBPbxzHEfLjZZ5c4olfeX0IJX9BDqgUntY0H1a/+Om/eDu4OZUz3EIJFFZBgz46YZSyTT6ZDvAEdpC/o66sNJmxvJIp+8zVoVDSqBUzxmc+oEamXLg7r2jdymxJMxau1kQFxEGLOrJnNxGsEe8UrYA3qSsm8m/Xg4uOh7RYgnuEEt88+KTvRq+CAMWhN3YNLtOJ3NmXowwE7e1Ma+jih9+UVfxZn14P5+SOJbQ2bYV2sCV+2vBiCQ==", |
|||
"DP": "oPiGO/qdOQfFEAS9fMInQnsrNylIZVpDYEVoDJ6/jQfE/IpuwxGcmsaGvCob3SKxZiJRLCWpwJYo1hCh/JOSVGWMkVyELky56nbbkkV5ymKLSGZ4JoetdQs+GchnPdR+k2P9Ij1Kjk13ylubN3htzNhcBASJpOfSEv5pPVzGKX0=", |
|||
"DQ": "z6imxLABHkyftbfUUtpeOlPanEHgpuIjmUdp3T1Ju1jziE63UEhuj0GPAXOF17uYxixwYE8JhOJ7+TyIK9oZeI3zH2OzJqQh8f5PCQ/E+0ULXZDeNV/ShDLCTufu3Fis9Rt64uTp/H/l21oMQ79jc0ysa8DTz1ReJLRc5qjL41U=", |
|||
"Exponent": "AQAB", |
|||
"InverseQ": "ieZcvSt5XYukKJKhXpv5Dm/1RD7iH88cZnhLSTEVTMoOUHoYWmApY5pNLGahbfjA9bxnkBWDYex/i7wE9uNNY5CsA6ovUaQLVJDt3kHvR9W+9QtN8D6jjG2TuRbbOdEg4RqhfjUaDfDIgTJX2Wxc8U98FOvOyGw1HzwUPFZKecM=", |
|||
"Modulus": "vk4z1Bmtmbo+gxITcY+FIlXzcO2wTOGlOXK5GMYj/6PUMFt7lbqkc72AkPsrAo5/JE8LYLhWj7fzSKbjvtowHCz5m2t+FlUYmuiKpvvnJsTqvQrckNlbZ1nm071q5PhP3Dar/OksfBhPtAX+c3+NjDnM/w53ccJJNaBDO/s9JYoN7vH5n6ed1pMSK71hmg4MPsxChcnc1f1PpnG2mqyJ253+GEUbj/kRyeBSmCCr9aadov2ZzxIKVaFNagJEHOzanQmorSLpP25GfOHCuy27Zkef94V/qU9elzjbH4uIKslVGx5T6H99TYh0sUGu11NytYJa5WNAZWow95CzurC2vw==", |
|||
"P": "4GMCQy+XTNzR5TsgFcdAZv2K6TcQR13fHVvPoxQp/b32V5YUJOBFEUAtqociy5ro4+KzpXP5WPSk1ZtznGKuNZyLq8gTnhpB3rwd0sdo4zxKnQ5nu+n1UhlhWNxg5A9V5TaciUAyPrHWJfLoYTQWygNTgJELQH5zZXi2ihC2uiU=", |
|||
"Q": "2R36pamnLAJggkPJxiW5qH6HizZ+bkQVg0BBftMLzkAM8Y9CwTW75GRUzGEJFpMckkw0GZSYb1Uwl3DVUpkcQ8LZ91IPYdPpDlYUshhIxl184M55pnO14besKxJtMZ64zhHKVAR2pBMO0n6W4/1iBXkkQqyPViJxdfvXPJMBbhM=" |
|||
} |
|||
} |
|||
@ -1,39 +0,0 @@ |
|||
// Global using directives
|
|||
|
|||
global using System; |
|||
global using System.Collections.Generic; |
|||
global using System.ComponentModel.DataAnnotations; |
|||
global using System.Linq; |
|||
global using System.Reflection; |
|||
global using System.Text; |
|||
global using System.Threading.Tasks; |
|||
global using Lion.AbpPro.BasicManagement; |
|||
global using Lion.AbpPro.BasicManagement.Localization; |
|||
global using Lion.AbpPro.Core; |
|||
global using Lion.AbpPro.DataDictionaryManagement; |
|||
global using Lion.AbpPro.LanguageManagement; |
|||
global using Lion.AbpPro.NotificationManagement; |
|||
global using Microsoft.Extensions.DependencyInjection; |
|||
global using Microsoft.Extensions.Localization; |
|||
global using Volo.Abp; |
|||
global using Volo.Abp.AuditLogging; |
|||
global using Volo.Abp.BackgroundJobs; |
|||
global using Volo.Abp.Data; |
|||
global using Volo.Abp.DependencyInjection; |
|||
global using Volo.Abp.FeatureManagement; |
|||
global using Volo.Abp.Identity; |
|||
global using Volo.Abp.Identity.Localization; |
|||
global using Volo.Abp.Localization; |
|||
global using Volo.Abp.Localization.ExceptionHandling; |
|||
global using Volo.Abp.Localization.Resources.AbpLocalization; |
|||
global using Volo.Abp.Modularity; |
|||
global using Volo.Abp.ObjectExtending; |
|||
global using Volo.Abp.PermissionManagement; |
|||
global using Volo.Abp.SettingManagement; |
|||
global using Volo.Abp.SettingManagement.Localization; |
|||
global using Volo.Abp.TenantManagement; |
|||
global using Volo.Abp.Threading; |
|||
global using Volo.Abp.Timing.Localization.Resources.AbpTiming; |
|||
global using Volo.Abp.Validation; |
|||
global using Volo.Abp.Validation.Localization; |
|||
global using Volo.Abp.VirtualFileSystem; |
|||
@ -1,8 +0,0 @@ |
|||
{ |
|||
"culture": "ar", |
|||
"texts": { |
|||
"Menu:Home": "الرئيسية", |
|||
"Welcome": "مرحبا", |
|||
"LongWelcomeMessage": "مرحبا بكم في التطبيق. هذا مشروع بدء تشغيل يعتمد على إطار عمل ABP. لمزيد من المعلومات ، يرجى زيارة abp.io." |
|||
} |
|||
} |
|||
@ -1,8 +0,0 @@ |
|||
{ |
|||
"culture": "cs", |
|||
"texts": { |
|||
"Menu:Home": "Úvod", |
|||
"Welcome": "Vítejte", |
|||
"LongWelcomeMessage": "Vítejte v aplikaci. Toto je startovací projekt založený na ABP frameworku. Pro více informací, navštivte abp.io." |
|||
} |
|||
} |
|||
@ -1,8 +0,0 @@ |
|||
{ |
|||
"culture": "de-DE", |
|||
"texts": { |
|||
"Menu:Home": "Home", |
|||
"Welcome": "Willkommen", |
|||
"LongWelcomeMessage": "Willkommen bei der Anwendung. Dies ist ein Startup-Projekt, das auf dem ABP-Framework basiert. Weitere Informationen finden Sie unter abp.io." |
|||
} |
|||
} |
|||
@ -1,8 +0,0 @@ |
|||
{ |
|||
"culture": "en-GB", |
|||
"texts": { |
|||
"Menu:Home": "Home", |
|||
"Welcome": "Welcome", |
|||
"LongWelcomeMessage": "Welcome to the application. This is a startup project based on the ABP framework. For more information, visit abp.io." |
|||
} |
|||
} |
|||
@ -1,29 +0,0 @@ |
|||
{ |
|||
"culture": "en", |
|||
"texts": { |
|||
"Menu:Home": "Home", |
|||
"Welcome": "Welcome", |
|||
"Test": "Test", |
|||
"LongWelcomeMessage": "Welcome to the application. This is a startup project based on the ABP framework. For more information, visit abp.io.", |
|||
"Permission:Query": "Query", |
|||
"Permission:Create": "Create", |
|||
"Permission:Update": "Update", |
|||
"Permission:Delete": "Delete", |
|||
"Permission:Export": "Export", |
|||
"Permission:Enable": "Enable|Disable", |
|||
"Permission:SystemManagement": "SystemManagement", |
|||
"Permission:AuditLogManagement": "AuditLog", |
|||
"Permission:HangfireManagement": "BackgroundTask", |
|||
"Permission:CapManagement": "IntegratedEvent", |
|||
"Permission:ESManagement": "ESManagement", |
|||
"Permission:SettingManagement": "SettingManagement", |
|||
"Permission:OrganizationUnitManagement": "OrganizationUnitManagement", |
|||
"Setting.Group.System": "System", |
|||
"Setting.Group.Other": "Other", |
|||
"DisplayName:Setting.Group.Other.Github": "Github", |
|||
"Description:Setting.Group.Other.Github": "Github", |
|||
"Enum:TestType:Created:1":"Created", |
|||
"Enum:TestType:Cancel:1":"Cancel", |
|||
"Enum:TestType:Delete:1":"Delete" |
|||
} |
|||
} |
|||
@ -1,8 +0,0 @@ |
|||
{ |
|||
"culture": "es", |
|||
"texts": { |
|||
"Menu:Home": "Inicio", |
|||
"Welcome": "Bienvenido", |
|||
"LongWelcomeMessage": "Bienvenido a la aplicación, este es un proyecto base basado en el framework ABP. Para más información, visita abp.io." |
|||
} |
|||
} |
|||
@ -1,8 +0,0 @@ |
|||
{ |
|||
"culture": "fr", |
|||
"texts": { |
|||
"Menu:Home": "Accueil", |
|||
"Welcome": "Bienvenue", |
|||
"LongWelcomeMessage": "Bienvenue dans l'application. Il s'agit d'un projet de démarrage basé sur le framework ABP. Pour plus d'informations, visitez abp.io." |
|||
} |
|||
} |
|||
@ -1,8 +0,0 @@ |
|||
{ |
|||
"culture": "hu", |
|||
"texts": { |
|||
"Menu:Home": "Kezdőlap", |
|||
"Welcome": "Üdvözlöm", |
|||
"LongWelcomeMessage": "Üdvözöljük az alkalmazásban. Ez egy ABP keretrendszeren alapuló startup projekt. További információkért látogasson el az abp.io oldalra." |
|||
} |
|||
} |
|||
@ -1,8 +0,0 @@ |
|||
{ |
|||
"culture": "nl", |
|||
"texts": { |
|||
"Menu:Home": "Home", |
|||
"Welcome": "Welkom", |
|||
"LongWelcomeMessage": "Welkom bij de applicatie. Dit is een startup-project gebaseerd op het ABP-framework. Bezoek abp.io voor meer informatie." |
|||
} |
|||
} |
|||
@ -1,8 +0,0 @@ |
|||
{ |
|||
"culture": "pl-PL", |
|||
"texts": { |
|||
"Menu:Home": "Home", |
|||
"Welcome": "Witaj", |
|||
"LongWelcomeMessage": "Witaj w aplikacji. To jest inicjalny projekt bazujący na ABP framework. Po więcej informacji odwiedź stronę abp.io." |
|||
} |
|||
} |
|||
@ -1,8 +0,0 @@ |
|||
{ |
|||
"culture": "pt-BR", |
|||
"texts": { |
|||
"Menu:Home": "Principal", |
|||
"Welcome": "Seja bem-vindo!", |
|||
"LongWelcomeMessage": "Bem-vindo a esta aplicação. Este é um projeto inicial baseado no ABP framework. Para mais informações, visite abp.io." |
|||
} |
|||
} |
|||
@ -1,8 +0,0 @@ |
|||
{ |
|||
"culture": "ru", |
|||
"texts": { |
|||
"Menu:Home": "Главная", |
|||
"Welcome": "Добро пожаловать", |
|||
"LongWelcomeMessage": "Добро пожаловать в приложение. Этот запущенный проект основан на фреймворке ABP. Для получения дополнительной информации посетите сайт abp.io." |
|||
} |
|||
} |
|||
@ -1,8 +0,0 @@ |
|||
{ |
|||
"culture": "sl", |
|||
"texts": { |
|||
"Menu:Home": "Domov", |
|||
"Welcome": "Dobrodošli", |
|||
"LongWelcomeMessage": "Dobrodošli v aplikaciji. To je začetni projekt na osnovi okolja ABP. Za več informacij obiščite abp.io." |
|||
} |
|||
} |
|||
@ -1,8 +0,0 @@ |
|||
{ |
|||
"culture": "tr", |
|||
"texts": { |
|||
"Menu:Home": "Ana sayfa", |
|||
"Welcome": "Hoşgeldiniz", |
|||
"LongWelcomeMessage": "Uygulamaya hoşgeldiniz. Bu, ABP framework'ü üzerine bina edilmiş bir başlangıç projesidir. Daha fazla bilgi için abp.io adresini ziyaret edebilirsiniz." |
|||
} |
|||
} |
|||
@ -1,8 +0,0 @@ |
|||
{ |
|||
"culture": "vi", |
|||
"texts": { |
|||
"Menu:Home": "Trang chủ", |
|||
"Welcome": "Chào mừng bạn", |
|||
"LongWelcomeMessage": "Chào mừng bạn đến ứng dụng. Đây là một dự án khởi nghiệp dựa trên khung ABP. Để biết thêm thông tin, hãy truy cập abp.io." |
|||
} |
|||
} |
|||
@ -1,30 +0,0 @@ |
|||
{ |
|||
"culture": "zh-Hans", |
|||
"texts": { |
|||
"Menu:Home": "首页", |
|||
"Welcome": "欢迎", |
|||
"Test": "测试", |
|||
"LongWelcomeMessage": "欢迎来到该应用程序. 这是一个基于ABP框架的启动项目. 有关更多信息, 请访问 abp.io.", |
|||
"Permission:Query": "查询", |
|||
"Permission:Create": "创建", |
|||
"Permission:Update": "编辑", |
|||
"Permission:Delete": "删除", |
|||
"Permission:Export": "导出", |
|||
"Permission:Enable": "启用|禁用", |
|||
"Permission:AuditLogManagement": "审计日志", |
|||
"Permission:SystemManagement": "系统管理", |
|||
"Permission:HangfireManagement": "后台任务", |
|||
"Permission:CapManagement": "集成事件", |
|||
"Permission:ESManagement": "ES日志", |
|||
"Permission:SettingManagement": "设置管理", |
|||
"Permission:OrganizationUnitManagement": "组织结构管理", |
|||
|
|||
"Setting.Group.System": "系统", |
|||
"Setting.Group.Other": "其它", |
|||
"DisplayName:Setting.Group.Other.Github": "Github", |
|||
"Description:Setting.Group.Other.Github": "Github", |
|||
"Enum:TestType:Created:1":"创建", |
|||
"Enum:TestType:Cancel:1":"取消", |
|||
"Enum:TestType:Delete:1":"删除" |
|||
} |
|||
} |
|||
@ -1,14 +0,0 @@ |
|||
{ |
|||
"culture": "zh-Hant", |
|||
"texts": { |
|||
"Menu:Home": "首頁", |
|||
"Welcome": "歡迎", |
|||
"LongWelcomeMessage": "歡迎來到此應用程式. 這是一個基於ABP框架的起始專案. 有關更多訊息, 請瀏覽 abp.io.", |
|||
"Permissions:Query": "查询", |
|||
"Permissions:Create": "创建", |
|||
"Permissions:Update": "更新", |
|||
"Permissions:Delete": "删除", |
|||
"Permissions:Enable": "启用|禁用", |
|||
"Permissions:AuditLogManagement": "审计日志" |
|||
} |
|||
} |
|||
@ -1,8 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName |
|||
{ |
|||
[LocalizationResourceName("MyProjectName")] |
|||
public class MyProjectNameResource |
|||
{ |
|||
|
|||
} |
|||
} |
|||
@ -1,11 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName.MultiTenancy |
|||
{ |
|||
public static class MultiTenancyConsts |
|||
{ |
|||
/* Enable/disable multi-tenancy easily in a single point. |
|||
* If you will never need to multi-tenancy, you can remove |
|||
* related modules and code parts, including this file. |
|||
*/ |
|||
public const bool IsEnabled = true; |
|||
} |
|||
} |
|||
@ -1,22 +0,0 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
<PropertyGroup> |
|||
<TargetFramework>net8.0</TargetFramework> |
|||
<RootNamespace>MyCompanyName.MyProjectName</RootNamespace> |
|||
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<EmbeddedResource Include="Localization\MyProjectName\*.json"/> |
|||
<Content Remove="Localization\MyProjectName\*.json"/> |
|||
</ItemGroup> |
|||
|
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\..\..\..\..\aspnet-core\frameworks\src\Lion.AbpPro.Core\Lion.AbpPro.Core.csproj"/> |
|||
<ProjectReference Include="..\..\..\..\..\aspnet-core\modules\BasicManagement\src\Lion.AbpPro.BasicManagement.Domain.Shared\Lion.AbpPro.BasicManagement.Domain.Shared.csproj"/> |
|||
<ProjectReference Include="..\..\..\..\..\aspnet-core\modules\NotificationManagement\src\Lion.AbpPro.NotificationManagement.Domain.Shared\Lion.AbpPro.NotificationManagement.Domain.Shared.csproj"/> |
|||
<ProjectReference Include="..\..\..\..\..\aspnet-core\modules\DataDictionaryManagement\src\Lion.AbpPro.DataDictionaryManagement.Domain.Shared\Lion.AbpPro.DataDictionaryManagement.Domain.Shared.csproj"/> |
|||
<ProjectReference Include="..\..\..\..\..\aspnet-core\modules\LanguageManagement\src\Lion.AbpPro.LanguageManagement.Domain.Shared\Lion.AbpPro.LanguageManagement.Domain.Shared.csproj"/> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
@ -1,7 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName |
|||
{ |
|||
public static class MyProjectNameDomainErrorCodes |
|||
{ |
|||
|
|||
} |
|||
} |
|||
@ -1,9 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName; |
|||
|
|||
public class MyProjectNameDomainSharedConsts |
|||
{ |
|||
/// <summary>名称空间</summary>
|
|||
public const string NameSpace = "MyCompanyName.MyProjectName"; |
|||
/// <summary>默认语言</summary>
|
|||
public const string DefaultCultureName = "zh-Hans"; |
|||
} |
|||
@ -1,44 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName |
|||
{ |
|||
[DependsOn( |
|||
typeof(BasicManagementDomainSharedModule), |
|||
typeof(NotificationManagementDomainSharedModule), |
|||
typeof(DataDictionaryManagementDomainSharedModule), |
|||
typeof(LanguageManagementDomainSharedModule), |
|||
typeof(AbpProCoreModule) |
|||
)] |
|||
public class MyProjectNameDomainSharedModule : AbpModule |
|||
{ |
|||
public override void PreConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
MyProjectNameGlobalFeatureConfigurator.Configure(); |
|||
MyProjectNameModuleExtensionConfigurator.Configure(); |
|||
} |
|||
|
|||
public override void ConfigureServices(ServiceConfigurationContext context) |
|||
{ |
|||
Configure<AbpVirtualFileSystemOptions>(options => |
|||
{ |
|||
options.FileSets.AddEmbedded<MyProjectNameDomainSharedModule>(MyProjectNameDomainSharedConsts.NameSpace); |
|||
}); |
|||
|
|||
Configure<AbpLocalizationOptions>(options => |
|||
{ |
|||
options.Resources |
|||
.Add<MyProjectNameResource>(MyProjectNameDomainSharedConsts.DefaultCultureName) |
|||
.AddVirtualJson("/Localization/MyProjectName") |
|||
.AddBaseTypes(typeof(BasicManagementResource)) |
|||
.AddBaseTypes(typeof(AbpTimingResource)); |
|||
|
|||
options.DefaultResourceType = typeof(MyProjectNameResource); |
|||
}); |
|||
|
|||
Configure<AbpExceptionLocalizationOptions>(options => |
|||
{ |
|||
options.MapCodeNamespace(MyProjectNameDomainSharedConsts.NameSpace, typeof(MyProjectNameResource)); |
|||
}); |
|||
} |
|||
|
|||
|
|||
} |
|||
} |
|||
@ -1,21 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName |
|||
{ |
|||
public static class MyProjectNameGlobalFeatureConfigurator |
|||
{ |
|||
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner(); |
|||
|
|||
public static void Configure() |
|||
{ |
|||
OneTimeRunner.Run(() => |
|||
{ |
|||
/* You can configure (enable/disable) global features of the used modules here. |
|||
* |
|||
* YOU CAN SAFELY DELETE THIS CLASS AND REMOVE ITS USAGES IF YOU DON'T NEED TO IT! |
|||
* |
|||
* Please refer to the documentation to lear more about the Global Features System: |
|||
* https://docs.abp.io/en/abp/latest/Global-Features
|
|||
*/ |
|||
}); |
|||
} |
|||
} |
|||
} |
|||
@ -1,67 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName |
|||
{ |
|||
public static class MyProjectNameModuleExtensionConfigurator |
|||
{ |
|||
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner(); |
|||
|
|||
public static void Configure() |
|||
{ |
|||
OneTimeRunner.Run(() => |
|||
{ |
|||
ConfigureExistingProperties(); |
|||
ConfigureExtraProperties(); |
|||
}); |
|||
} |
|||
|
|||
private static void ConfigureExistingProperties() |
|||
{ |
|||
/* You can change max lengths for properties of the |
|||
* entities defined in the modules used by your application. |
|||
* |
|||
* Example: Change user and role name max lengths |
|||
|
|||
IdentityUserConsts.MaxNameLength = 99; |
|||
IdentityRoleConsts.MaxNameLength = 99; |
|||
|
|||
* Notice: It is not suggested to change property lengths |
|||
* unless you really need it. Go with the standard values wherever possible. |
|||
* |
|||
* If you are using EF Core, you will need to run the add-migration command after your changes. |
|||
*/ |
|||
} |
|||
|
|||
private static void ConfigureExtraProperties() |
|||
{ |
|||
/* You can configure extra properties for the |
|||
* entities defined in the modules used by your application. |
|||
* |
|||
* This class can be used to define these extra properties |
|||
* with a high level, easy to use API. |
|||
* |
|||
* Example: Add a new property to the user entity of the identity module |
|||
|
|||
ObjectExtensionManager.Instance.Modules() |
|||
.ConfigureIdentity(identity => |
|||
{ |
|||
identity.ConfigureUser(user => |
|||
{ |
|||
user.AddOrUpdateProperty<string>( //property type: string
|
|||
"SocialSecurityNumber", //property name
|
|||
property => |
|||
{ |
|||
//validation rules
|
|||
property.Attributes.Add(new RequiredAttribute()); |
|||
property.Attributes.Add(new StringLengthAttribute(64) {MinimumLength = 4}); |
|||
|
|||
//...other configurations for this property
|
|||
} |
|||
); |
|||
}); |
|||
}); |
|||
|
|||
* See the documentation for more: |
|||
* https://docs.abp.io/en/abp/latest/Module-Entity-Extensions
|
|||
*/ |
|||
} |
|||
} |
|||
} |
|||
@ -1,7 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName.Users.Dto |
|||
{ |
|||
public class UserOutput |
|||
{ |
|||
public Guid Id { get; set; } |
|||
} |
|||
} |
|||
@ -1,7 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName.Data |
|||
{ |
|||
public interface IMyProjectNameDbSchemaMigrator |
|||
{ |
|||
Task MigrateAsync(); |
|||
} |
|||
} |
|||
@ -1,204 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName.Data |
|||
{ |
|||
public class MyProjectNameDbMigrationService : ITransientDependency |
|||
{ |
|||
public ILogger<MyProjectNameDbMigrationService> Logger { get; set; } |
|||
private readonly IDataSeeder _dataSeeder; |
|||
private readonly IEnumerable<IMyProjectNameDbSchemaMigrator> _dbSchemaMigrators; |
|||
private readonly ITenantRepository _tenantRepository; |
|||
private readonly ICurrentTenant _currentTenant; |
|||
|
|||
public MyProjectNameDbMigrationService( |
|||
IDataSeeder dataSeeder, |
|||
IEnumerable<IMyProjectNameDbSchemaMigrator> dbSchemaMigrators, |
|||
ITenantRepository tenantRepository, |
|||
ICurrentTenant currentTenant) |
|||
{ |
|||
_dataSeeder = dataSeeder; |
|||
_dbSchemaMigrators = dbSchemaMigrators; |
|||
_tenantRepository = tenantRepository; |
|||
_currentTenant = currentTenant; |
|||
|
|||
Logger = NullLogger<MyProjectNameDbMigrationService>.Instance; |
|||
} |
|||
|
|||
public async Task MigrateAsync() |
|||
{ |
|||
var initialMigrationAdded = AddInitialMigrationIfNotExist(); |
|||
|
|||
if (initialMigrationAdded) |
|||
{ |
|||
return; |
|||
} |
|||
|
|||
Logger.LogInformation("Started database migrations..."); |
|||
|
|||
await MigrateDatabaseSchemaAsync(); |
|||
await SeedDataAsync(); |
|||
|
|||
Logger.LogInformation($"Successfully completed host database migrations."); |
|||
|
|||
var tenants = await _tenantRepository.GetListAsync(includeDetails: true); |
|||
|
|||
var migratedDatabaseSchemas = new HashSet<string>(); |
|||
foreach (var tenant in tenants) |
|||
{ |
|||
using (_currentTenant.Change(tenant.Id)) |
|||
{ |
|||
if (tenant.ConnectionStrings.Any()) |
|||
{ |
|||
var tenantConnectionStrings = tenant.ConnectionStrings |
|||
.Select(x => x.Value) |
|||
.ToList(); |
|||
|
|||
if (!migratedDatabaseSchemas.IsSupersetOf(tenantConnectionStrings)) |
|||
{ |
|||
await MigrateDatabaseSchemaAsync(tenant); |
|||
|
|||
migratedDatabaseSchemas.AddIfNotContains(tenantConnectionStrings); |
|||
} |
|||
} |
|||
|
|||
await SeedDataAsync(tenant); |
|||
} |
|||
|
|||
Logger.LogInformation($"Successfully completed {tenant.Name} tenant database migrations."); |
|||
} |
|||
|
|||
Logger.LogInformation("Successfully completed all database migrations."); |
|||
Logger.LogInformation("You can safely end this process..."); |
|||
} |
|||
|
|||
private async Task MigrateDatabaseSchemaAsync(Tenant tenant = null) |
|||
{ |
|||
Logger.LogInformation( |
|||
$"Migrating schema for {(tenant == null ? "host" : tenant.Name + " tenant")} database..."); |
|||
|
|||
foreach (var migrator in _dbSchemaMigrators) |
|||
{ |
|||
await migrator.MigrateAsync(); |
|||
} |
|||
} |
|||
|
|||
private async Task SeedDataAsync(Tenant tenant = null) |
|||
{ |
|||
Logger.LogInformation($"Executing {(tenant == null ? "host" : tenant.Name + " tenant")} database seed..."); |
|||
|
|||
await _dataSeeder.SeedAsync(new DataSeedContext(tenant?.Id) |
|||
.WithProperty(IdentityDataSeedContributor.AdminEmailPropertyName, IdentityDataSeedContributor.AdminEmailDefaultValue) |
|||
.WithProperty(IdentityDataSeedContributor.AdminPasswordPropertyName, IdentityDataSeedContributor.AdminPasswordDefaultValue) |
|||
); |
|||
} |
|||
|
|||
private bool AddInitialMigrationIfNotExist() |
|||
{ |
|||
try |
|||
{ |
|||
if (!DbMigrationsProjectExists()) |
|||
{ |
|||
return false; |
|||
} |
|||
} |
|||
catch (Exception) |
|||
{ |
|||
return false; |
|||
} |
|||
|
|||
try |
|||
{ |
|||
if (!MigrationsFolderExists()) |
|||
{ |
|||
AddInitialMigration(); |
|||
return true; |
|||
} |
|||
else |
|||
{ |
|||
return false; |
|||
} |
|||
} |
|||
catch (Exception e) |
|||
{ |
|||
Logger.LogWarning("Couldn't determinate if any migrations exist : " + e.Message); |
|||
return false; |
|||
} |
|||
} |
|||
|
|||
private bool DbMigrationsProjectExists() |
|||
{ |
|||
var dbMigrationsProjectFolder = GetDbMigrationsProjectFolderPath(); |
|||
|
|||
return dbMigrationsProjectFolder != null; |
|||
} |
|||
|
|||
private bool MigrationsFolderExists() |
|||
{ |
|||
var dbMigrationsProjectFolder = GetDbMigrationsProjectFolderPath(); |
|||
|
|||
return Directory.Exists(Path.Combine(dbMigrationsProjectFolder, "EntityFrameworkCore")); |
|||
} |
|||
|
|||
private void AddInitialMigration() |
|||
{ |
|||
Logger.LogInformation("Creating initial migration..."); |
|||
|
|||
string argumentPrefix; |
|||
string fileName; |
|||
|
|||
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) |
|||
{ |
|||
argumentPrefix = "-c"; |
|||
fileName = "/bin/bash"; |
|||
} |
|||
else |
|||
{ |
|||
argumentPrefix = "/C"; |
|||
fileName = "cmd.exe"; |
|||
} |
|||
|
|||
var procStartInfo = new ProcessStartInfo(fileName, |
|||
$"{argumentPrefix} \"abp create-migration-and-run-migrator \"{GetDbMigrationsProjectFolderPath()}\"\"" |
|||
); |
|||
|
|||
try |
|||
{ |
|||
Process.Start(procStartInfo); |
|||
} |
|||
catch (Exception) |
|||
{ |
|||
throw new Exception("Couldn't run ABP CLI..."); |
|||
} |
|||
} |
|||
|
|||
private string GetDbMigrationsProjectFolderPath() |
|||
{ |
|||
var slnDirectoryPath = GetSolutionDirectoryPath(); |
|||
|
|||
if (slnDirectoryPath == null) |
|||
{ |
|||
throw new Exception("Solution folder not found!"); |
|||
} |
|||
|
|||
var srcDirectoryPath = Path.Combine(slnDirectoryPath, "src"); |
|||
|
|||
return Directory.GetDirectories(srcDirectoryPath) |
|||
.FirstOrDefault(d => d.EndsWith(".DbMigrations")); |
|||
} |
|||
|
|||
private string GetSolutionDirectoryPath() |
|||
{ |
|||
var currentDirectory = new DirectoryInfo(Directory.GetCurrentDirectory()); |
|||
|
|||
while (Directory.GetParent(currentDirectory.FullName) != null) |
|||
{ |
|||
currentDirectory = Directory.GetParent(currentDirectory.FullName); |
|||
|
|||
if (Directory.GetFiles(currentDirectory.FullName).FirstOrDefault(f => f.EndsWith(".sln")) != null) |
|||
{ |
|||
return currentDirectory.FullName; |
|||
} |
|||
} |
|||
|
|||
return null; |
|||
} |
|||
} |
|||
} |
|||
@ -1,13 +0,0 @@ |
|||
namespace MyCompanyName.MyProjectName.Data |
|||
{ |
|||
/* This is used if database provider does't define |
|||
* IMyProjectNameDbSchemaMigrator implementation. |
|||
*/ |
|||
public class NullMyProjectNameDbSchemaMigrator : IMyProjectNameDbSchemaMigrator, ITransientDependency |
|||
{ |
|||
public Task MigrateAsync() |
|||
{ |
|||
return Task.CompletedTask; |
|||
} |
|||
} |
|||
} |
|||
@ -1,32 +0,0 @@ |
|||
// Global using directives
|
|||
|
|||
global using System; |
|||
global using System.Collections.Generic; |
|||
global using System.Diagnostics; |
|||
global using System.IO; |
|||
global using System.Linq; |
|||
global using System.Runtime.InteropServices; |
|||
global using System.Threading.Tasks; |
|||
global using Lion.AbpPro.BasicManagement; |
|||
global using Lion.AbpPro.DataDictionaryManagement; |
|||
global using Lion.AbpPro.LanguageManagement; |
|||
global using Lion.AbpPro.NotificationManagement; |
|||
global using MyCompanyName.MyProjectName.MultiTenancy; |
|||
global using MyCompanyName.MyProjectName.Users.Dto; |
|||
global using Microsoft.Extensions.DependencyInjection; |
|||
global using Microsoft.Extensions.Logging; |
|||
global using Microsoft.Extensions.Logging.Abstractions; |
|||
global using Volo.Abp.AutoMapper; |
|||
global using Volo.Abp.Data; |
|||
global using Volo.Abp.DependencyInjection; |
|||
global using Volo.Abp.Domain.Services; |
|||
global using Volo.Abp.EventBus.Distributed; |
|||
global using Volo.Abp.Identity; |
|||
global using Volo.Abp.Localization; |
|||
global using Volo.Abp.Modularity; |
|||
global using Volo.Abp.MultiTenancy; |
|||
global using Volo.Abp.ObjectMapping; |
|||
global using Volo.Abp.SettingManagement; |
|||
global using Volo.Abp.Settings; |
|||
global using Volo.Abp.TenantManagement; |
|||
global using Volo.Abp.Uow; |
|||
@ -1,19 +0,0 @@ |
|||
<Project Sdk="Microsoft.NET.Sdk"> |
|||
|
|||
<PropertyGroup> |
|||
<TargetFramework>net8.0</TargetFramework> |
|||
<RootNamespace>MyCompanyName.MyProjectName</RootNamespace> |
|||
</PropertyGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\MyCompanyName.MyProjectName.Domain.Shared\MyCompanyName.MyProjectName.Domain.Shared.csproj"/> |
|||
</ItemGroup> |
|||
|
|||
<ItemGroup> |
|||
<ProjectReference Include="..\..\..\..\..\aspnet-core\modules\BasicManagement\src\Lion.AbpPro.BasicManagement.Domain\Lion.AbpPro.BasicManagement.Domain.csproj"/> |
|||
<ProjectReference Include="..\..\..\..\..\aspnet-core\modules\NotificationManagement\src\Lion.AbpPro.NotificationManagement.Domain\Lion.AbpPro.NotificationManagement.Domain.csproj"/> |
|||
<ProjectReference Include="..\..\..\..\..\aspnet-core\modules\DataDictionaryManagement\src\Lion.AbpPro.DataDictionaryManagement.Domain\Lion.AbpPro.DataDictionaryManagement.Domain.csproj"/> |
|||
<ProjectReference Include="..\..\..\..\..\aspnet-core\modules\LanguageManagement\src\Lion.AbpPro.LanguageManagement.Domain\Lion.AbpPro.LanguageManagement.Domain.csproj"/> |
|||
</ItemGroup> |
|||
|
|||
</Project> |
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue