Compare commits
7 Commits
eaabdc3593
...
cca8a04574
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cca8a04574 | ||
|
|
050a41008e | ||
|
|
1cdd4d2e7c | ||
|
|
86da3f9799 | ||
|
|
bd97056548 | ||
|
|
64e3813146 | ||
|
|
9362b6245c |
310
.gitignore
vendored
@ -1,271 +1,41 @@
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
################################################################################
|
||||
# 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。
|
||||
################################################################################
|
||||
|
||||
# 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/
|
||||
.DS_Store
|
||||
# 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
|
||||
|
||||
/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
|
||||
/docs/site
|
||||
/aspnet-core/modules/LanguageManagement/host/Lion.AbpPro.LanguageManagement.HttpApi.Host/Logs
|
||||
/aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Mysql.Tests/Logs
|
||||
/aspnet-core/frameworks/test/Lion.AbpPro.EntityFrameworkCore.Mysql.Tests/wwwroot/libs
|
||||
/templates/abp-vnext-pro-nuget-all/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/logs
|
||||
/templates/abp-vnext-pro-nuget-simplify/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/logs
|
||||
/vben28/pnpm-lock.yaml
|
||||
/host/JiShe.IOT.HttpApi.Host/logs
|
||||
/.vs
|
||||
/gateways/JiShe.IoT.WebGateway/bin/Debug/net9.0
|
||||
/gateways/JiShe.IoT.WebGateway/obj
|
||||
/host/JiShe.IoT.HttpApi.Host/bin/Debug/net9.0
|
||||
/host/JiShe.IoT.HttpApi.Host/Logs
|
||||
/host/JiShe.IoT.HttpApi.Host/obj
|
||||
/src/JiShe.IoT.Application/bin/Debug/net9.0
|
||||
/src/JiShe.IoT.Application/obj/Debug/net9.0
|
||||
/src/JiShe.IoT.Application.Contracts/bin/Debug/net9.0
|
||||
/src/JiShe.IoT.Application.Contracts/obj/Debug/net9.0
|
||||
/src/JiShe.IoT.DbMigrator/bin/Debug/net9.0
|
||||
/src/JiShe.IoT.DbMigrator/obj
|
||||
/src/JiShe.IoT.Domain/bin/Debug/net9.0
|
||||
/src/JiShe.IoT.Domain/obj
|
||||
/src/JiShe.IoT.Domain.Shared/bin/Debug/net9.0
|
||||
/src/JiShe.IoT.Domain.Shared/obj/Debug/net9.0
|
||||
/src/JiShe.IoT.EntityFrameworkCore/bin/Debug/net9.0
|
||||
/src/JiShe.IoT.EntityFrameworkCore/obj
|
||||
/src/JiShe.IoT.FreeSqlRepository/bin/Debug/net9.0
|
||||
/src/JiShe.IoT.FreeSqlRepository/obj
|
||||
/src/JiShe.IoT.HttpApi/bin/Debug/net9.0
|
||||
/src/JiShe.IoT.HttpApi/obj
|
||||
/src/JiShe.IoT.HttpApi.Client/bin/Debug/net9.0
|
||||
/src/JiShe.IoT.HttpApi.Client/obj
|
||||
/test/JiShe.IoT.Application.Tests/bin/Debug/net9.0
|
||||
/test/JiShe.IoT.Application.Tests/obj
|
||||
/test/JiShe.IoT.Domain.Tests/bin/Debug/net9.0
|
||||
/test/JiShe.IoT.Domain.Tests/obj
|
||||
/test/JiShe.IoT.EntityFrameworkCore.Tests/bin/Debug/net9.0
|
||||
/test/JiShe.IoT.EntityFrameworkCore.Tests/obj
|
||||
/test/JiShe.IoT.HttpApi.Client.ConsoleTestApp/bin/Debug/net9.0
|
||||
/test/JiShe.IoT.HttpApi.Client.ConsoleTestApp/obj
|
||||
/test/JiShe.IoT.TestBase/bin/Debug/net9.0
|
||||
/test/JiShe.IoT.TestBase/obj
|
||||
/src/JiShe.IoT.Application/obj
|
||||
/src/JiShe.IoT.Application.Contracts/obj
|
||||
/src/JiShe.IoT.Domain.Shared/obj
|
||||
|
||||
79
Directory.Build.JiShe.targets
Normal file
@ -0,0 +1,79 @@
|
||||
<Project>
|
||||
<!-- JiShe.ServicePro包-->
|
||||
<ItemGroup>
|
||||
<PackageReference Update="JiShe.ServicePro.Core" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.CAP" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.CAP.EntityFrameworkCore" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.Localization" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.Oidc" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.TwoFactor" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.Shared.Hosting.Microservices" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.Shared.Hosting.Gateways" Version="1.0.1"/>
|
||||
|
||||
<PackageReference Update="JiShe.ServicePro.BasicManagement.Application" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.BasicManagement.Application.Contracts" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.BasicManagement.Domain" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.BasicManagement.Domain.Shared" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.BasicManagement.EntityFrameworkCore" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.BasicManagement.HttpApi" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.BasicManagement.HttpApi.Client" Version="1.0.1"/>
|
||||
|
||||
|
||||
<PackageReference Update="JiShe.ServicePro.NotificationManagement.Application" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.NotificationManagement.Application.Contracts" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.NotificationManagement.Domain" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.NotificationManagement.Domain.Shared" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.NotificationManagement.EntityFrameworkCore" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.NotificationManagement.HttpApi" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.NotificationManagement.HttpApi.Client" Version="1.0.1"/>
|
||||
|
||||
<PackageReference Update="JiShe.ServicePro.DataDictionaryManagement.Application" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.DataDictionaryManagement.Application.Contracts" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.DataDictionaryManagement.Domain" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.DataDictionaryManagement.Domain.Shared" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.DataDictionaryManagement.EntityFrameworkCore" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.DataDictionaryManagement.HttpApi" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.DataDictionaryManagement.HttpApi.Client" Version="1.0.1"/>
|
||||
|
||||
<PackageReference Update="JiShe.ServicePro.LanguageManagement.Application" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.LanguageManagement.Application.Contracts" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.LanguageManagement.Domain" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.LanguageManagement.Domain.Shared" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.LanguageManagement.EntityFrameworkCore" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.LanguageManagement.HttpApi" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.LanguageManagement.HttpApi.Client" Version="1.0.1"/>
|
||||
|
||||
<PackageReference Update="JiShe.ServicePro.CodeManagement.Application" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.CodeManagement.Application.Contracts" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.CodeManagement.Domain" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.CodeManagement.Domain.Shared" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.CodeManagement.EntityFrameworkCore" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.CodeManagement.HttpApi" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.CodeManagement.HttpApi.Client" Version="1.0.1"/>
|
||||
|
||||
|
||||
<PackageReference Update="JiShe.ServicePro.TemplateManagement.Application" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.TemplateManagement.Application.Contracts" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.TemplateManagement.Domain" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.TemplateManagement.Domain.Shared" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.TemplateManagement.EntityFrameworkCore" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.TemplateManagement.HttpApi" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.TemplateManagement.HttpApi.Client" Version="1.0.1"/>
|
||||
|
||||
<PackageReference Update="JiShe.ServicePro.DynamicMenuManagement.Application" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.DynamicMenuManagement.Application.Contracts" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.DynamicMenuManagement.Domain" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.DynamicMenuManagement.Domain.Shared" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.DynamicMenuManagement.EntityFrameworkCore" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.DynamicMenuManagement.HttpApi" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.DynamicMenuManagement.HttpApi.Client" Version="1.0.1"/>
|
||||
|
||||
|
||||
<PackageReference Update="JiShe.ServicePro.FreeRedisProvider" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.ServicePro.FreeSqlProvider" Version="1.0.1"/>
|
||||
|
||||
<PackageReference Update="JiShe.CollectBus.IoTDB" Version="1.0.1"/>
|
||||
<PackageReference Update="JiShe.CollectBus.Kafka" Version="1.0.1"/>
|
||||
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@ -1,41 +0,0 @@
|
||||
<Project>
|
||||
<!-- Lion.AbpPro包-->
|
||||
<ItemGroup>
|
||||
<PackageReference Update="Lion.AbpPro.Core" Version="9.0.6.10"/>
|
||||
<PackageReference Update="Lion.AbpPro.Shared.Hosting.Microservices" Version="9.0.6.10"/>
|
||||
<PackageReference Update="Lion.AbpPro.Shared.Hosting.Gateways" Version="9.0.6.10"/>
|
||||
|
||||
<PackageReference Update="Lion.AbpPro.BasicManagement.Application" Version="9.0.6.10"/>
|
||||
<PackageReference Update="Lion.AbpPro.BasicManagement.Application.Contracts" Version="9.0.6.10"/>
|
||||
<PackageReference Update="Lion.AbpPro.BasicManagement.Domain" Version="9.0.6.10"/>
|
||||
<PackageReference Update="Lion.AbpPro.BasicManagement.Domain.Shared" Version="9.0.6.10"/>
|
||||
<PackageReference Update="Lion.AbpPro.BasicManagement.EntityFrameworkCore" Version="9.0.6.10"/>
|
||||
<PackageReference Update="Lion.AbpPro.BasicManagement.HttpApi" Version="9.0.6.10"/>
|
||||
<PackageReference Update="Lion.AbpPro.BasicManagement.HttpApi.Client" Version="9.0.6.10"/>
|
||||
|
||||
|
||||
<PackageReference Update="Lion.AbpPro.NotificationManagement.Application" Version="9.0.6.10"/>
|
||||
<PackageReference Update="Lion.AbpPro.NotificationManagement.Application.Contracts" Version="9.0.6.10"/>
|
||||
<PackageReference Update="Lion.AbpPro.NotificationManagement.Domain" Version="9.0.6.10"/>
|
||||
<PackageReference Update="Lion.AbpPro.NotificationManagement.Domain.Shared" Version="9.0.6.10"/>
|
||||
<PackageReference Update="Lion.AbpPro.NotificationManagement.EntityFrameworkCore" Version="9.0.6.10"/>
|
||||
<PackageReference Update="Lion.AbpPro.NotificationManagement.HttpApi" Version="9.0.6.10"/>
|
||||
<PackageReference Update="Lion.AbpPro.NotificationManagement.HttpApi.Client" Version="9.0.6.10"/>
|
||||
|
||||
<PackageReference Update="Lion.AbpPro.DataDictionaryManagement.Application" Version="9.0.6.10"/>
|
||||
<PackageReference Update="Lion.AbpPro.DataDictionaryManagement.Application.Contracts" Version="9.0.6.10"/>
|
||||
<PackageReference Update="Lion.AbpPro.DataDictionaryManagement.Domain" Version="9.0.6.10"/>
|
||||
<PackageReference Update="Lion.AbpPro.DataDictionaryManagement.Domain.Shared" Version="9.0.6.10"/>
|
||||
<PackageReference Update="Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore" Version="9.0.6.10"/>
|
||||
<PackageReference Update="Lion.AbpPro.DataDictionaryManagement.HttpApi" Version="9.0.6.10"/>
|
||||
<PackageReference Update="Lion.AbpPro.DataDictionaryManagement.HttpApi.Client" Version="9.0.6.10"/>
|
||||
|
||||
<PackageReference Update="Lion.AbpPro.LanguageManagement.Application" Version="9.0.6.10"/>
|
||||
<PackageReference Update="Lion.AbpPro.LanguageManagement.Application.Contracts" Version="9.0.6.10"/>
|
||||
<PackageReference Update="Lion.AbpPro.LanguageManagement.Domain" Version="9.0.6.10"/>
|
||||
<PackageReference Update="Lion.AbpPro.LanguageManagement.Domain.Shared" Version="9.0.6.10"/>
|
||||
<PackageReference Update="Lion.AbpPro.LanguageManagement.EntityFrameworkCore" Version="9.0.6.10"/>
|
||||
<PackageReference Update="Lion.AbpPro.LanguageManagement.HttpApi" Version="9.0.6.10"/>
|
||||
<PackageReference Update="Lion.AbpPro.LanguageManagement.HttpApi.Client" Version="9.0.6.10"/>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@ -1,94 +1,98 @@
|
||||
<Project>
|
||||
<ItemGroup>
|
||||
<PackageReference Update="Volo.Abp.Autofac" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Threading" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Json" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Validation" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Ddd.Domain" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.AutoMapper" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.ObjectMapping" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Identity.AspNetCore" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Caching" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.BlobStoring.Aliyun" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.BackgroundJobs" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Authorization.Abstractions" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.BackgroundJobs.HangFire" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.AspNetCore.SignalR" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.TestBase" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.EntityFrameworkCore.MySQL" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Identity.EntityFrameworkCore" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.BackgroundJobs.EntityFrameworkCore" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.TenantManagement.EntityFrameworkCore" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.FeatureManagement.EntityFrameworkCore" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.AspNetCore.Mvc.Contracts" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Account.Web" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Caching.StackExchangeRedis" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.EntityFrameworkCore.PostgreSql" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.AspNetCore.Serilog" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Swashbuckle" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Ddd.Application" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Ddd.Application.Contracts" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Authorization" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Dapper" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.AspNetCore.Mvc" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Http.Client" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.MongoDB" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.EntityFrameworkCore.Sqlite" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Http.Client.IdentityModel" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.AspNetCore.MultiTenancy" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Account.Application" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Identity.Application" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.PermissionManagement.Application" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.TenantManagement.Application" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.FeatureManagement.Application" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.SettingManagement.Application" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.ObjectExtending" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Account.Application.Contracts" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Identity.Application.Contracts" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.PermissionManagement.Application.Contracts" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.TenantManagement.Application.Contracts" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.FeatureManagement.Application.Contracts" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.SettingManagement.Application.Contracts" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Emailing" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.PermissionManagement.Domain.Identity" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.BackgroundJobs.Domain" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.AuditLogging.Domain" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.TenantManagement.Domain" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.FeatureManagement.Domain" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.SettingManagement.Domain" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Identity.Domain" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Identity.Domain.Shared" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.BackgroundJobs.Domain.Shared" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.AuditLogging.Domain.Shared" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.TenantManagement.Domain.Shared" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.FeatureManagement.Domain.Shared" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.PermissionManagement.Domain.Shared" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.SettingManagement.Domain.Shared" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Account.HttpApi" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Identity.HttpApi" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.PermissionManagement.HttpApi" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.TenantManagement.HttpApi" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.FeatureManagement.HttpApi" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.SettingManagement.HttpApi" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Account.HttpApi.Client" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Identity.HttpApi.Client" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.PermissionManagement.HttpApi.Client" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.TenantManagement.HttpApi.Client" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.FeatureManagement.HttpApi.Client" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.SettingManagement.HttpApi.Client" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.AspNetCore" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Core" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.EntityFrameworkCore" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.AspNetCore.TestBase" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.EventBus" Version="9.0.4"/>
|
||||
<PackageReference Update="Volo.Abp.Localization" Version="9.0.4" />
|
||||
<PackageReference Update="Volo.Abp.DistributedLocking" Version="9.0.4" />
|
||||
<PackageReference Update="Volo.Abp.Autofac" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Threading" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Json" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Json.Abstractions" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Validation" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Ddd.Domain" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.AutoMapper" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Settings" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.ObjectMapping" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Identity.AspNetCore" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Caching" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.BlobStoring.Aliyun" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.BlobStoring" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.BlobStoring.FileSystem" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.BackgroundJobs" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Authorization.Abstractions" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.BackgroundJobs.HangFire" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.AspNetCore.SignalR" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.TestBase" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.EntityFrameworkCore.MySQL" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Identity.EntityFrameworkCore" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.BackgroundJobs.EntityFrameworkCore" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.TenantManagement.EntityFrameworkCore" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.FeatureManagement.EntityFrameworkCore" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.AspNetCore.Mvc.Contracts" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Account.Web" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Caching.StackExchangeRedis" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.EntityFrameworkCore.PostgreSql" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.AspNetCore.Serilog" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Swashbuckle" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Ddd.Application" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Ddd.Application.Contracts" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Authorization" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Dapper" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.AspNetCore.Mvc" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Http.Client" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.MongoDB" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.EntityFrameworkCore.Sqlite" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Http.Client.IdentityModel" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.AspNetCore.MultiTenancy" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Account.Application" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Identity.Application" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.PermissionManagement.Application" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.TenantManagement.Application" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.FeatureManagement.Application" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.SettingManagement.Application" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.ObjectExtending" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Account.Application.Contracts" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Identity.Application.Contracts" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.PermissionManagement.Application.Contracts" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.TenantManagement.Application.Contracts" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.FeatureManagement.Application.Contracts" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.SettingManagement.Application.Contracts" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Emailing" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.PermissionManagement.Domain.Identity" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.BackgroundJobs.Domain" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.AuditLogging.Domain" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.TenantManagement.Domain" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.FeatureManagement.Domain" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.SettingManagement.Domain" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Identity.Domain" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Identity.Domain.Shared" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.BackgroundJobs.Domain.Shared" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.AuditLogging.Domain.Shared" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.TenantManagement.Domain.Shared" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.FeatureManagement.Domain.Shared" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.PermissionManagement.Domain.Shared" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.SettingManagement.Domain.Shared" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Account.HttpApi" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Identity.HttpApi" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.PermissionManagement.HttpApi" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.TenantManagement.HttpApi" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.FeatureManagement.HttpApi" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.SettingManagement.HttpApi" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Account.HttpApi.Client" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Identity.HttpApi.Client" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.PermissionManagement.HttpApi.Client" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.TenantManagement.HttpApi.Client" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.FeatureManagement.HttpApi.Client" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.SettingManagement.HttpApi.Client" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.AspNetCore" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Core" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.EntityFrameworkCore" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.AspNetCore.TestBase" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.EventBus" Version="9.1.1"/>
|
||||
<PackageReference Update="Volo.Abp.Localization" Version="9.1.1" />
|
||||
<PackageReference Update="Volo.Abp.DistributedLocking" Version="9.1.1" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
<Import Project="Directory.Build.Microsoft.targets"/>
|
||||
<Import Project="Directory.Build.Volo.targets"/>
|
||||
<Import Project="Directory.Build.Lion.targets"/>
|
||||
<Import Project="Directory.Build.JiShe.targets"/>
|
||||
|
||||
<PropertyGroup>
|
||||
<LangVersion>latest</LangVersion>
|
||||
@ -28,10 +28,6 @@
|
||||
<PackageReference Update="Ocelot.Provider.Consul" Version="18.0.0"/>
|
||||
<PackageReference Update="Ocelot.Provider.Polly" Version="18.0.0"/>
|
||||
|
||||
<!-- FreeSql-->
|
||||
<PackageReference Update="FreeSql" Version="3.5.104"/>
|
||||
<PackageReference Update="FreeSql.Provider.MysqlConnector" Version="3.5.104"/>
|
||||
<PackageReference Update="FreeSql.Provider.Sqlite" Version="3.2.806"/>
|
||||
|
||||
<!-- 单元测试包-->
|
||||
<PackageReference Update="xunit" Version="2.9.2"/>
|
||||
@ -47,12 +43,12 @@
|
||||
<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"/>
|
||||
<PackageReference Update="DotNetCore.CAP" Version="8.3.3"/>
|
||||
<PackageReference Update="DotNetCore.CAP.Dashboard" Version="8.3.3"/>
|
||||
<PackageReference Update="DotNetCore.CAP.Mysql" Version="8.3.3"/>
|
||||
<PackageReference Update="DotNetCore.CAP.RabbitMQ" Version="8.3.3"/>
|
||||
<PackageReference Update="DotNetCore.CAP.InMemoryStorage" Version="8.3.3"/>
|
||||
<PackageReference Update="Savorboard.CAP.InMemoryMessageQueue" Version="8.2.1"/>
|
||||
|
||||
<!-- Swagger-->
|
||||
<PackageReference Update="Swashbuckle.AspNetCore.SwaggerUI" Version="6.8.1"/>
|
||||
|
||||
35
Dockerfile
@ -1,30 +1,6 @@
|
||||
# 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", "JiShe.IOT.HttpApi.Host.dll"]
|
||||
|
||||
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
EXPOSE 8080
|
||||
EXPOSE 443
|
||||
ENV TZ=Asia/Shanghai
|
||||
ENV ASPNETCORE_ENVIRONMENT=Production
|
||||
@ -32,15 +8,14 @@ ENV ASPNETCORE_ENVIRONMENT=Production
|
||||
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
WORKDIR "/src/host/JiShe.IOT.HttpApi.Host"
|
||||
RUN dotnet build "JiShe.IOT.HttpApi.Host.csproj" -c Release -o /app/build
|
||||
WORKDIR "/host/JiShe.IoT.HttpApi.Host"
|
||||
RUN dotnet build "JiShe.IoT.HttpApi.Host.csproj" -c Release -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish "JiShe.IOT.HttpApi.Host.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
||||
RUN dotnet publish "JiShe.IoT.HttpApi.Host.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
ENTRYPOINT ["dotnet", "JiShe.IOT.HttpApi.Host.dll"]
|
||||
|
||||
ENTRYPOINT ["dotnet", "JiShe.IoT.HttpApi.Host.dll"]
|
||||
|
||||
|
||||
@ -2,52 +2,53 @@ 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}") = "JiShe.IOT.Domain", "src\JiShe.IOT.Domain\JiShe.IOT.Domain.csproj", "{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.IoT.Domain", "src\JiShe.IoT.Domain\JiShe.IoT.Domain.csproj", "{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.IOT.Application", "src\JiShe.IOT.Application\JiShe.IOT.Application.csproj", "{1A94A50E-06DC-43C1-80B5-B662820EC3EB}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.IoT.Application", "src\JiShe.IoT.Application\JiShe.IoT.Application.csproj", "{1A94A50E-06DC-43C1-80B5-B662820EC3EB}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.IOT.EntityFrameworkCore", "src\JiShe.IOT.EntityFrameworkCore\JiShe.IOT.EntityFrameworkCore.csproj", "{C956DD76-69C8-4A9C-83EA-D17DF83340FD}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.IoT.EntityFrameworkCore", "src\JiShe.IoT.EntityFrameworkCore\JiShe.IoT.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}") = "JiShe.IOT.Application.Tests", "test\JiShe.IOT.Application.Tests\JiShe.IOT.Application.Tests.csproj", "{50B2631D-129C-47B3-A587-029CCD6099BC}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.IoT.Application.Tests", "test\JiShe.IoT.Application.Tests\JiShe.IoT.Application.Tests.csproj", "{50B2631D-129C-47B3-A587-029CCD6099BC}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.IOT.Domain.Shared", "src\JiShe.IOT.Domain.Shared\JiShe.IOT.Domain.Shared.csproj", "{42F719ED-8413-4895-B5B4-5AB56079BC66}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.IoT.Domain.Shared", "src\JiShe.IoT.Domain.Shared\JiShe.IoT.Domain.Shared.csproj", "{42F719ED-8413-4895-B5B4-5AB56079BC66}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.IOT.Application.Contracts", "src\JiShe.IOT.Application.Contracts\JiShe.IOT.Application.Contracts.csproj", "{520659C8-C734-4298-A3DA-B539DB9DFC0B}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.IoT.Application.Contracts", "src\JiShe.IoT.Application.Contracts\JiShe.IoT.Application.Contracts.csproj", "{520659C8-C734-4298-A3DA-B539DB9DFC0B}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.IOT.HttpApi", "src\JiShe.IOT.HttpApi\JiShe.IOT.HttpApi.csproj", "{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.IoT.HttpApi", "src\JiShe.IoT.HttpApi\JiShe.IoT.HttpApi.csproj", "{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.IOT.HttpApi.Client", "src\JiShe.IOT.HttpApi.Client\JiShe.IOT.HttpApi.Client.csproj", "{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.IoT.HttpApi.Client", "src\JiShe.IoT.HttpApi.Client\JiShe.IoT.HttpApi.Client.csproj", "{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.IOT.EntityFrameworkCore.Tests", "test\JiShe.IOT.EntityFrameworkCore.Tests\JiShe.IOT.EntityFrameworkCore.Tests.csproj", "{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.IoT.EntityFrameworkCore.Tests", "test\JiShe.IoT.EntityFrameworkCore.Tests\JiShe.IoT.EntityFrameworkCore.Tests.csproj", "{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.IOT.TestBase", "test\JiShe.IOT.TestBase\JiShe.IOT.TestBase.csproj", "{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.IoT.TestBase", "test\JiShe.IoT.TestBase\JiShe.IoT.TestBase.csproj", "{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.IOT.Domain.Tests", "test\JiShe.IOT.Domain.Tests\JiShe.IOT.Domain.Tests.csproj", "{E512F4D9-9375-480F-A2F6-A46509F9D824}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.IoT.Domain.Tests", "test\JiShe.IoT.Domain.Tests\JiShe.IoT.Domain.Tests.csproj", "{E512F4D9-9375-480F-A2F6-A46509F9D824}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.IOT.HttpApi.Client.ConsoleTestApp", "test\JiShe.IOT.HttpApi.Client.ConsoleTestApp\JiShe.IOT.HttpApi.Client.ConsoleTestApp.csproj", "{EF480016-9127-4916-8735-D2466BDBC582}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.IoT.HttpApi.Client.ConsoleTestApp", "test\JiShe.IoT.HttpApi.Client.ConsoleTestApp\JiShe.IoT.HttpApi.Client.ConsoleTestApp.csproj", "{EF480016-9127-4916-8735-D2466BDBC582}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.IOT.DbMigrator", "src\JiShe.IOT.DbMigrator\JiShe.IOT.DbMigrator.csproj", "{AA94D832-1CCC-4715-95A9-A483F23A1A5D}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.IoT.DbMigrator", "src\JiShe.IoT.DbMigrator\JiShe.IoT.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
|
||||
NuGet.Config = NuGet.Config
|
||||
Directory.Build.JiShe.targets = Directory.Build.JiShe.targets
|
||||
Directory.Build.Microsoft.targets = Directory.Build.Microsoft.targets
|
||||
Directory.Build.targets = Directory.Build.targets
|
||||
Directory.Build.Volo.targets = Directory.Build.Volo.targets
|
||||
Directory.Build.Lion.targets = Directory.Build.Lion.targets
|
||||
Dockerfile = Dockerfile
|
||||
NuGet.Config = NuGet.Config
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "host", "host", "{8C1B8C6C-C518-4290-B070-622CCA6004DA}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.IOT.HttpApi.Host", "host\JiShe.IOT.HttpApi.Host\JiShe.IOT.HttpApi.Host.csproj", "{FB20372D-6C96-4733-9AAC-12522F15CAA6}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.IoT.HttpApi.Host", "host\JiShe.IoT.HttpApi.Host\JiShe.IoT.HttpApi.Host.csproj", "{FB20372D-6C96-4733-9AAC-12522F15CAA6}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JiShe.IOT.FreeSqlRepository", "src\JiShe.IOT.FreeSqlRepository\JiShe.IOT.FreeSqlRepository.csproj", "{27C7A0E6-4C2E-4AFF-9DE7-1F526DDC0D18}"
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gateways", "gateways", "{81A8FF2E-DE2E-479D-A209-EDA81C2AF08A}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.IOT.WebGateway", "host\JiShe.IOT.WebGateway\JiShe.IOT.WebGateway.csproj", "{9C009501-0ED2-4930-B020-C8D06FE28E44}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JiShe.IoT.WebGateway", "gateways\JiShe.IoT.WebGateway\JiShe.IoT.WebGateway.csproj", "{F1D46EE1-13D5-4227-80DC-066DEB0E4FD1}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@ -111,14 +112,10 @@ Global
|
||||
{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
|
||||
{9C009501-0ED2-4930-B020-C8D06FE28E44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9C009501-0ED2-4930-B020-C8D06FE28E44}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9C009501-0ED2-4930-B020-C8D06FE28E44}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9C009501-0ED2-4930-B020-C8D06FE28E44}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F1D46EE1-13D5-4227-80DC-066DEB0E4FD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F1D46EE1-13D5-4227-80DC-066DEB0E4FD1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F1D46EE1-13D5-4227-80DC-066DEB0E4FD1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F1D46EE1-13D5-4227-80DC-066DEB0E4FD1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@ -138,8 +135,7 @@ Global
|
||||
{EF480016-9127-4916-8735-D2466BDBC582} = {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}
|
||||
{9C009501-0ED2-4930-B020-C8D06FE28E44} = {8C1B8C6C-C518-4290-B070-622CCA6004DA}
|
||||
{F1D46EE1-13D5-4227-80DC-066DEB0E4FD1} = {81A8FF2E-DE2E-479D-A209-EDA81C2AF08A}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F}
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="localnuget" value="D:\CodeBase\DiyPackage" />
|
||||
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
@ -1,7 +1,7 @@
|
||||
namespace Lion.AbpPro.WebGateway
|
||||
namespace JiShe.ServicePro.WebGateway
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(AbpProSharedHostingGatewayModule))]
|
||||
typeof(ServiceProSharedHostingGatewayModule))]
|
||||
public class AbpProWebGatewayModule : AbpModule
|
||||
{
|
||||
private const string DefaultCorsPolicyName = "Default";
|
||||
@ -17,6 +17,6 @@ ENV TZ=Asia/Shanghai
|
||||
# 设置环境变量
|
||||
ENV ASPNETCORE_ENVIRONMENT=Production
|
||||
|
||||
ENTRYPOINT ["dotnet", "JiShe.IOT.WebGateway.dll"]
|
||||
ENTRYPOINT ["dotnet", "JiShe.IoT.WebGateway.dll"]
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ global using System;
|
||||
global using System.Collections.Generic;
|
||||
global using System.Linq;
|
||||
global using System.Threading.Tasks;
|
||||
global using Lion.AbpPro;
|
||||
global using JiShe.ServicePro;
|
||||
global using Microsoft.AspNetCore.Builder;
|
||||
global using Microsoft.AspNetCore.Cors;
|
||||
global using Microsoft.AspNetCore.Hosting;
|
||||
@ -5,6 +5,6 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Lion.AbpPro.Shared.Hosting.Gateways"/>
|
||||
<PackageReference Include="JiShe.ServicePro.Shared.Hosting.Gateways"/>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@ -1,4 +1,4 @@
|
||||
namespace Lion.AbpPro.WebGateway
|
||||
namespace JiShe.ServicePro.WebGateway
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "http://json.schemastore.org/launchsettings.json",
|
||||
"profiles": {
|
||||
"JiShe.IOT.WebGateway": {
|
||||
"JiShe.IoT.WebGateway": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": false,
|
||||
"launchUrl": "swagger",
|
||||
@ -17,7 +17,7 @@
|
||||
{
|
||||
"DownstreamPathTemplate": "/{url}",
|
||||
"DownstreamScheme": "http",
|
||||
"ServiceName": "IOT-Service",
|
||||
"ServiceName": "IoT-Service",
|
||||
"LoadBalancerOptions": {
|
||||
"Type": "LeastConnection"
|
||||
},
|
||||
@ -32,7 +32,7 @@
|
||||
{
|
||||
"DownstreamPathTemplate": "/{url}",
|
||||
"DownstreamScheme": "ws",
|
||||
"ServiceName": "IOT-Service",
|
||||
"ServiceName": "IoT-Service",
|
||||
"LoadBalancerOptions": {
|
||||
"Type": "LeastConnection"
|
||||
},
|
||||
@ -1,290 +0,0 @@
|
||||
namespace JiShe.IOT
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(IOTHttpApiModule),
|
||||
typeof(AbpProSharedHostingMicroserviceModule),
|
||||
typeof(AbpAspNetCoreMvcUiMultiTenancyModule),
|
||||
typeof(IOTEntityFrameworkCoreModule),
|
||||
typeof(AbpAspNetCoreAuthenticationJwtBearerModule),
|
||||
typeof(AbpAspNetCoreSerilogModule),
|
||||
typeof(AbpAccountWebModule),
|
||||
typeof(IOTApplicationModule),
|
||||
typeof(AbpAspNetCoreMvcUiBasicThemeModule),
|
||||
typeof(AbpCachingStackExchangeRedisModule)
|
||||
)]
|
||||
public class IOTHttpApiHostModule : 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();
|
||||
var configuration = context.GetConfiguration();
|
||||
|
||||
app.UseAbpProRequestLocalization();
|
||||
app.UseCorrelationId();
|
||||
app.UseStaticFiles();
|
||||
app.UseMiniProfiler();
|
||||
app.UseRouting();
|
||||
app.UseCors(IOTHttpApiHostConst.DefaultCorsPolicyName);
|
||||
app.UseAuthentication();
|
||||
|
||||
if (MultiTenancyConsts.IsEnabled)
|
||||
{
|
||||
app.UseMultiTenancy();
|
||||
}
|
||||
|
||||
app.UseAuthorization();
|
||||
app.UseSwagger();
|
||||
app.UseAbpSwaggerUI(options =>
|
||||
{
|
||||
options.SwaggerEndpoint("/swagger/IOT/swagger.json", "IOT API");
|
||||
options.DocExpansion(DocExpansion.None);
|
||||
options.DefaultModelsExpandDepth(-1);
|
||||
});
|
||||
|
||||
app.UseAuditing();
|
||||
app.UseAbpSerilogEnrichers();
|
||||
|
||||
app.UseUnitOfWork();
|
||||
app.UseConfiguredEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.MapHealthChecks("/health");
|
||||
|
||||
// endpoints.MapHangfireDashboard("/hangfire", new DashboardOptions()
|
||||
// {
|
||||
// Authorization = new[] { new CustomHangfireAuthorizeFilter() },
|
||||
// IgnoreAntiforgeryToken = true
|
||||
// });
|
||||
|
||||
});
|
||||
|
||||
|
||||
if (configuration.GetValue("Consul:Enabled", false))
|
||||
{
|
||||
app.UseConsul();
|
||||
}
|
||||
}
|
||||
|
||||
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[IOTHttpApiHostConst.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 = "IOT:"; });
|
||||
var configuration = context.Services.GetConfiguration();
|
||||
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
|
||||
context.Services
|
||||
.AddDataProtection()
|
||||
.PersistKeysToStackExchangeRedis(redis, "IOT-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("IOT",
|
||||
new OpenApiInfo { Title = "JiSheIOT 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 = "JiShe.IOT";
|
||||
}
|
||||
);
|
||||
|
||||
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,65 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<RootNamespace>JiShe.IOT</RootNamespace>
|
||||
<PreserveCompilationReferences>true</PreserveCompilationReferences>
|
||||
<UserSecretsId>JiShe.IOT-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="..\..\src\JiShe.IOT.Application\JiShe.IOT.Application.csproj"/>
|
||||
<ProjectReference Include="..\..\src\JiShe.IOT.EntityFrameworkCore\JiShe.IOT.EntityFrameworkCore.csproj"/>
|
||||
<ProjectReference Include="..\..\src\JiShe.IOT.HttpApi\JiShe.IOT.HttpApi.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Lion.AbpPro.Shared.Hosting.Microservices"/>
|
||||
</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,25 +0,0 @@
|
||||
namespace JiShe.IOT
|
||||
{
|
||||
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,16 +0,0 @@
|
||||
namespace JiShe.IOT
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services.AddApplication<IOTHttpApiHostModule>();
|
||||
}
|
||||
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
|
||||
{
|
||||
app.InitializeApplication();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,3 +0,0 @@
|
||||
{
|
||||
|
||||
}
|
||||
@ -1,61 +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://*.IOT.com,http://localhost:4200,http://localhost:3100,http://118.190.144.92:9111"
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"Default": "Data Source=118.190.144.92;Port=33306;Database=JiSheIOTDB;uid=root;pwd=admin123;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true"
|
||||
},
|
||||
"Redis": {
|
||||
"Configuration": "118.190.144.92:6379,defaultdatabase=14"
|
||||
},
|
||||
"Jwt": {
|
||||
"Audience": "JiShe.IOT",
|
||||
"SecurityKey": "dzehzRz9a8asdfasfdadfasdfasdfafsdadfasbasdf=",
|
||||
"Issuer": "JiShe.IOT",
|
||||
"ExpirationTime": 2
|
||||
},
|
||||
"ElasticSearch": {
|
||||
"Enabled": "false",
|
||||
"Url": "http://es.cn",
|
||||
"IndexFormat": "JiShe.IOT.development.{0:yyyy.MM.dd}",
|
||||
"UserName": "elastic",
|
||||
"Password": "aVVhjQ95RP7nbwNy",
|
||||
"SearchIndexFormat": "JiShe.IOT.development*"
|
||||
},
|
||||
"Consul": {
|
||||
"Enabled": false,
|
||||
"Host": "http://localhost:8500",
|
||||
"Service": "Project-Service"
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
namespace JiShe.IOT.Controllers
|
||||
namespace JiShe.IoT.Controllers
|
||||
{
|
||||
public class HomeController : AbpController
|
||||
{
|
||||
@ -1,4 +1,4 @@
|
||||
namespace JiShe.IOT.Extensions.Hangfire;
|
||||
namespace JiShe.IoT.Extensions.Hangfire;
|
||||
|
||||
public class AutoDeleteAfterSuccessAttributer : JobFilterAttribute, IApplyStateFilter
|
||||
{
|
||||
@ -1,4 +1,4 @@
|
||||
namespace JiShe.IOT.Extensions.Hangfire
|
||||
namespace JiShe.IoT.Extensions.Hangfire
|
||||
{
|
||||
/// <summary>
|
||||
/// Cron类型
|
||||
@ -1,4 +1,4 @@
|
||||
namespace JiShe.IOT.Extensions.Hangfire
|
||||
namespace JiShe.IoT.Extensions.Hangfire
|
||||
{
|
||||
public class CustomHangfireAuthorizeFilter : IDashboardAuthorizationFilter
|
||||
{
|
||||
@ -1,4 +1,4 @@
|
||||
namespace JiShe.IOT.Extensions.Hangfire;
|
||||
namespace JiShe.IoT.Extensions.Hangfire;
|
||||
|
||||
/// <summary>
|
||||
/// 重试最后一次
|
||||
@ -1,6 +1,6 @@
|
||||
using JiShe.IOT.Jobs;
|
||||
using JiShe.IoT.Jobs;
|
||||
|
||||
namespace JiShe.IOT.Extensions.Hangfire
|
||||
namespace JiShe.IoT.Extensions.Hangfire
|
||||
{
|
||||
public static class RecurringJobsExtensions
|
||||
{
|
||||
@ -12,11 +12,13 @@ global using Hangfire.Common;
|
||||
global using Hangfire.Dashboard;
|
||||
global using Hangfire.States;
|
||||
global using Hangfire.Storage;
|
||||
global using Lion.AbpPro;
|
||||
global using JiShe.IOT.EntityFrameworkCore;
|
||||
global using JiShe.IOT.Extensions;
|
||||
global using JiShe.IOT.Extensions.Hangfire;
|
||||
global using JiShe.IOT.MultiTenancy;
|
||||
global using JiShe.ServicePro;
|
||||
global using JiShe.ServicePro.CAP;
|
||||
global using JiShe.ServicePro.CAP.EntityFrameworkCore;
|
||||
global using JiShe.IoT.EntityFrameworkCore;
|
||||
global using JiShe.IoT.Extensions;
|
||||
global using JiShe.IoT.Extensions.Hangfire;
|
||||
global using JiShe.IoT.MultiTenancy;
|
||||
global using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
global using Microsoft.AspNetCore.Builder;
|
||||
global using Microsoft.AspNetCore.DataProtection;
|
||||
@ -35,6 +37,7 @@ global using Microsoft.Extensions.Logging.Abstractions;
|
||||
global using Microsoft.Extensions.Options;
|
||||
global using Microsoft.IdentityModel.Tokens;
|
||||
global using Microsoft.OpenApi.Models;
|
||||
global using JiShe.IoT;
|
||||
global using Serilog;
|
||||
global using StackExchange.Redis;
|
||||
global using Swagger;
|
||||
@ -55,6 +58,7 @@ 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.DistributedLocking;
|
||||
global using Volo.Abp.Domain.Entities;
|
||||
global using Volo.Abp.ExceptionHandling;
|
||||
global using Volo.Abp.Http;
|
||||
@ -1,6 +1,6 @@
|
||||
namespace JiShe.IOT
|
||||
namespace JiShe.IoT
|
||||
{
|
||||
public static class IOTHttpApiHostConst
|
||||
public static class IoTHttpApiHostConst
|
||||
{
|
||||
/// <summary>
|
||||
/// 跨域策略名
|
||||
@ -10,7 +10,7 @@ namespace JiShe.IOT
|
||||
/// <summary>
|
||||
/// Cookies名称
|
||||
/// </summary>
|
||||
public const string DefaultCookieName = "JiShe.IOT.Http.Api";
|
||||
public const string DefaultCookieName = "JiShe.IoT.Http.Api";
|
||||
|
||||
/// <summary>
|
||||
/// SwaggerUi 端点
|
||||
274
host/JiShe.IoT.HttpApi.Host/IoTHttpApiHostModule.Configure.cs
Normal file
@ -0,0 +1,274 @@
|
||||
using Hangfire.Redis.StackExchange;
|
||||
using Medallion.Threading;
|
||||
using Medallion.Threading.Redis;
|
||||
|
||||
namespace JiShe.IoT;
|
||||
|
||||
public partial class IoTHttpApiHostModule
|
||||
{
|
||||
private void ConfigureHangfire(ServiceConfigurationContext context)
|
||||
{
|
||||
var redisStorageOptions = new RedisStorageOptions()
|
||||
{
|
||||
Db = context.Services.GetConfiguration().GetValue<int>("Hangfire:Redis:DB")
|
||||
};
|
||||
|
||||
Configure<AbpBackgroundJobOptions>(options => { options.IsJobExecutionEnabled = true; });
|
||||
|
||||
context.Services.AddHangfire(config =>
|
||||
{
|
||||
config.UseRedisStorage(
|
||||
context.Services.GetConfiguration().GetValue<string>("Hangfire:Redis:Host"), redisStorageOptions)
|
||||
.WithJobExpirationTimeout(TimeSpan.FromDays(7));
|
||||
var delaysInSeconds = new[] { 10, 60, 60 * 3 }; // 重试时间间隔
|
||||
const int Attempts = 3; // 重试次数
|
||||
config.UseFilter(new AutomaticRetryAttribute() { Attempts = Attempts, DelaysInSeconds = delaysInSeconds });
|
||||
//config.UseFilter(new AutoDeleteAfterSuccessAttribute(TimeSpan.FromDays(7)));
|
||||
config.UseFilter(new JobRetryLastFilter(Attempts));
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 配置MiniProfiler
|
||||
/// </summary>
|
||||
private void ConfigureMiniProfiler(ServiceConfigurationContext context)
|
||||
{
|
||||
if (context.Services.GetConfiguration().GetValue("MiniProfiler:Enabled", false))
|
||||
{
|
||||
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[IoTHttpApiHostConst.DefaultCookieName];
|
||||
}
|
||||
|
||||
currentContext.Token = accessToken;
|
||||
currentContext.Request.Headers.Remove("Authorization");
|
||||
currentContext.Request.Headers.Append("Authorization", $"Bearer {accessToken}");
|
||||
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Redis缓存
|
||||
/// </summary>
|
||||
private void ConfigureCache(ServiceConfigurationContext context)
|
||||
{
|
||||
Configure<AbpDistributedCacheOptions>(
|
||||
options => { options.KeyPrefix = "AbpPro:"; });
|
||||
var configuration = context.Services.GetConfiguration();
|
||||
var redis = ConnectionMultiplexer.Connect(configuration.GetValue<string>("Redis:Configuration"));
|
||||
context.Services
|
||||
.AddDataProtection()
|
||||
.PersistKeysToStackExchangeRedis(redis, "AbpPro-Protection-Keys");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 配置Identity
|
||||
/// </summary>
|
||||
private void ConfigureIdentity(ServiceConfigurationContext context)
|
||||
{
|
||||
context.Services.Configure<IdentityOptions>(options => { options.Lockout = new LockoutOptions() { AllowedForNewUsers = false }; });
|
||||
}
|
||||
|
||||
private void ConfigurationSignalR(ServiceConfigurationContext context)
|
||||
{
|
||||
context.Services
|
||||
.AddSignalR()
|
||||
.AddStackExchangeRedis(context.Services.GetConfiguration().GetValue<string>("Redis:Configuration"),
|
||||
options => { options.Configuration.ChannelPrefix = "JiShe.ServicePro"; });
|
||||
}
|
||||
|
||||
private void ConfigureSwaggerServices(ServiceConfigurationContext context)
|
||||
{
|
||||
context.Services.AddSwaggerGen(
|
||||
options =>
|
||||
{
|
||||
// 文件下载类型
|
||||
options.MapType<FileContentResult>(() => new OpenApiSchema() { Type = "file" });
|
||||
|
||||
options.SwaggerDoc("AbpPro",
|
||||
new OpenApiInfo { Title = "AbpPro 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>()
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private void ConfigureCap(ServiceConfigurationContext context)
|
||||
{
|
||||
var configuration = context.Services.GetConfiguration();
|
||||
context.AddAbpCap(capOptions =>
|
||||
{
|
||||
capOptions.SetCapDbConnectionString(configuration["ConnectionStrings:Default"]);
|
||||
capOptions.UseEntityFramework<IoTDbContext>();
|
||||
capOptions.UseRabbitMQ(option =>
|
||||
{
|
||||
option.HostName = configuration.GetValue<string>("Cap:RabbitMq:HostName");
|
||||
option.UserName = configuration.GetValue<string>("Cap:RabbitMq:UserName");
|
||||
option.Password = configuration.GetValue<string>("Cap:RabbitMq:Password");
|
||||
option.Port = configuration.GetValue<int>("Cap:RabbitMq:Port");
|
||||
});
|
||||
capOptions.UseDashboard(options =>
|
||||
{
|
||||
options.AuthorizationPolicy = ServiceProCapPermissions.CapManagement.Cap;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 审计日志
|
||||
/// </summary>
|
||||
private void ConfigureAuditLog(ServiceConfigurationContext context)
|
||||
{
|
||||
Configure<AbpAuditingOptions>
|
||||
(
|
||||
options =>
|
||||
{
|
||||
options.IsEnabled = true;
|
||||
EntityHistorySelectorListExtensions.AddAllEntities(options.EntityHistorySelectors);
|
||||
options.ApplicationName = "JiShe.ServicePro";
|
||||
}
|
||||
);
|
||||
|
||||
Configure<AbpAspNetCoreAuditingOptions>(
|
||||
options =>
|
||||
{
|
||||
options.IgnoredUrls.Add("/AuditLogs/page");
|
||||
options.IgnoredUrls.Add("/hangfire/stats");
|
||||
options.IgnoredUrls.Add("/hangfire/recurring/trigger");
|
||||
options.IgnoredUrls.Add("/cap");
|
||||
options.IgnoredUrls.Add("/");
|
||||
});
|
||||
}
|
||||
|
||||
private void ConfigurationMultiTenancy()
|
||||
{
|
||||
Configure<AbpMultiTenancyOptions>(options => { options.IsEnabled = MultiTenancyConsts.IsEnabled; });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 配置redis分布式锁
|
||||
/// </summary>
|
||||
private void ConfigurationDistributedLocking(ServiceConfigurationContext context)
|
||||
{
|
||||
var configuration = context.Services.GetConfiguration();
|
||||
var connectionString = configuration.GetValue<string>("Redis:Configuration");
|
||||
context.Services.AddSingleton<IDistributedLockProvider>(sp =>
|
||||
{
|
||||
var connection = ConnectionMultiplexer.Connect(connectionString);
|
||||
return new RedisDistributedSynchronizationProvider(connection.GetDatabase());
|
||||
});
|
||||
}
|
||||
}
|
||||
96
host/JiShe.IoT.HttpApi.Host/IoTHttpApiHostModule.cs
Normal file
@ -0,0 +1,96 @@
|
||||
namespace JiShe.IoT
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(IoTHttpApiModule),
|
||||
typeof(ServiceProSharedHostingMicroserviceModule),
|
||||
typeof(AbpAspNetCoreMvcUiMultiTenancyModule),
|
||||
typeof(IoTEntityFrameworkCoreModule),
|
||||
typeof(AbpAspNetCoreAuthenticationJwtBearerModule),
|
||||
typeof(AbpAspNetCoreSerilogModule),
|
||||
typeof(AbpAccountWebModule),
|
||||
typeof(IoTApplicationModule),
|
||||
// typeof(AbpProCapModule),
|
||||
// typeof(AbpProCapEntityFrameworkCoreModule),
|
||||
typeof(AbpAspNetCoreMvcUiBasicThemeModule),
|
||||
typeof(AbpCachingStackExchangeRedisModule),
|
||||
typeof(AbpDistributedLockingModule)
|
||||
//typeof(AbpBackgroundJobsHangfireModule)
|
||||
)]
|
||||
public partial class IoTHttpApiHostModule : AbpModule
|
||||
{
|
||||
public override void OnPostApplicationInitialization(ApplicationInitializationContext context)
|
||||
{
|
||||
// 应用程序初始化的时候注册hangfire
|
||||
//context.CreateRecurringJob();
|
||||
base.OnPostApplicationInitialization(context);
|
||||
}
|
||||
|
||||
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||
{
|
||||
var configuration = context.Services.GetConfiguration();
|
||||
ConfigureCache(context);
|
||||
ConfigurationDistributedLocking(context);
|
||||
ConfigureSwaggerServices(context);
|
||||
ConfigureJwtAuthentication(context, configuration);
|
||||
//ConfigureHangfire(context);
|
||||
ConfigureMiniProfiler(context);
|
||||
ConfigureIdentity(context);
|
||||
//ConfigureCap(context);
|
||||
ConfigureAuditLog(context);
|
||||
ConfigurationSignalR(context);
|
||||
ConfigurationMultiTenancy();
|
||||
|
||||
}
|
||||
|
||||
public override void OnApplicationInitialization(ApplicationInitializationContext context)
|
||||
{
|
||||
var app = context.GetApplicationBuilder();
|
||||
var configuration = context.GetConfiguration();
|
||||
app.UseServiceProRequestLocalization();
|
||||
app.UseCorrelationId();
|
||||
app.MapAbpStaticAssets();
|
||||
if (configuration.GetValue("MiniProfiler:Enabled", false))
|
||||
{
|
||||
app.UseMiniProfiler();
|
||||
}
|
||||
|
||||
app.UseRouting();
|
||||
app.UseCors(IoTHttpApiHostConst.DefaultCorsPolicyName);
|
||||
app.UseAuthentication();
|
||||
|
||||
if (MultiTenancyConsts.IsEnabled)
|
||||
{
|
||||
app.UseMultiTenancy();
|
||||
}
|
||||
|
||||
app.UseAuthorization();
|
||||
app.UseSwagger();
|
||||
app.UseAbpSwaggerUI(options =>
|
||||
{
|
||||
options.SwaggerEndpoint("/swagger/AbpPro/swagger.json", "AbpPro API");
|
||||
options.DocExpansion(DocExpansion.None);
|
||||
options.DefaultModelsExpandDepth(-1);
|
||||
});
|
||||
|
||||
app.UseAuditing();
|
||||
app.UseAbpSerilogEnrichers();
|
||||
app.UseUnitOfWork();
|
||||
app.UseConfiguredEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.MapHealthChecks("/health");
|
||||
|
||||
// endpoints.MapHangfireDashboard("/hangfire", new DashboardOptions()
|
||||
// {
|
||||
// Authorization = new[] { new CustomHangfireAuthorizeFilter() },
|
||||
// IgnoreAntiforgeryToken = true
|
||||
// });
|
||||
|
||||
});
|
||||
|
||||
if (configuration.GetValue("Consul:Enabled", false))
|
||||
{
|
||||
app.UseConsul();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
68
host/JiShe.IoT.HttpApi.Host/JiShe.IoT.HttpApi.Host.csproj
Normal file
@ -0,0 +1,68 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<RootNamespace>JiShe.IoT</RootNamespace>
|
||||
<PreserveCompilationReferences>true</PreserveCompilationReferences>
|
||||
<UserSecretsId>JiShe.IoT-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="JiShe.ServicePro.CAP" />
|
||||
<PackageReference Include="JiShe.ServicePro.CAP.EntityFrameworkCore" />
|
||||
<PackageReference Include="DotNetCore.CAP.MySql" />
|
||||
<PackageReference Include="DotNetCore.CAP.RabbitMQ" />
|
||||
<PackageReference Include="DotNetCore.CAP.Dashboard" />
|
||||
<PackageReference Include="MiniProfiler.AspNetCore.Mvc" />
|
||||
<PackageReference Include="MiniProfiler.EntityFrameworkCore" />
|
||||
<PackageReference Include="MiniProfiler.Shared" />
|
||||
<PackageReference Include="Volo.Abp.BackgroundJobs.HangFire" />
|
||||
<PackageReference Include="Volo.Abp.DistributedLocking"/>
|
||||
<PackageReference Include="DistributedLock.Redis"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\JiShe.IoT.Application\JiShe.IoT.Application.csproj"/>
|
||||
<ProjectReference Include="..\..\src\JiShe.IoT.EntityFrameworkCore\JiShe.IoT.EntityFrameworkCore.csproj"/>
|
||||
<ProjectReference Include="..\..\src\JiShe.IoT.HttpApi\JiShe.IoT.HttpApi.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="JiShe.ServicePro.Shared.Hosting.Microservices"/>
|
||||
</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,5 +1,5 @@
|
||||
@page
|
||||
@model JiShe.IOT.Pages.Login
|
||||
@model JiShe.IoT.Pages.Login
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
@ -1,11 +1,11 @@
|
||||
|
||||
using Lion.AbpPro.BasicManagement.ConfigurationOptions;
|
||||
using Lion.AbpPro.BasicManagement.Users;
|
||||
using Lion.AbpPro.BasicManagement.Users.Dtos;
|
||||
using JiShe.ServicePro.BasicManagement.ConfigurationOptions;
|
||||
using JiShe.ServicePro.BasicManagement.Users;
|
||||
using JiShe.ServicePro.BasicManagement.Users.Dtos;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
|
||||
|
||||
namespace JiShe.IOT.Pages
|
||||
namespace JiShe.IoT.Pages
|
||||
{
|
||||
public class Login : PageModel
|
||||
{
|
||||
@ -48,12 +48,12 @@ namespace JiShe.IOT.Pages
|
||||
|
||||
|
||||
// 设置cookies domain
|
||||
//options.Domain = "IOT.cn";
|
||||
//options.Domain = "IoT.cn";
|
||||
|
||||
|
||||
var result = await _accountAppService.LoginAsync(new LoginInput()
|
||||
{ Name = userName, Password = password });
|
||||
Response.Cookies.Append(IOTHttpApiHostConst.DefaultCookieName,
|
||||
Response.Cookies.Append(IoTHttpApiHostConst.DefaultCookieName,
|
||||
result.Token, options);
|
||||
}
|
||||
catch (Exception e)
|
||||
@ -1,6 +1,6 @@
|
||||
@page
|
||||
@using JiShe.IOT
|
||||
@model JiShe.IOT.Pages.Monitor
|
||||
@using JiShe.IoT
|
||||
@model JiShe.IoT.Pages.Monitor
|
||||
|
||||
|
||||
@{
|
||||
@ -27,12 +27,12 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-6 col-md-4 col-lg-3">
|
||||
<div class="thumbnail" style="height: 180px">
|
||||
<a href="@IOTHttpApiHostConst.SwaggerUiEndPoint" target="_blank">
|
||||
<a href="@IoTHttpApiHostConst.SwaggerUiEndPoint" target="_blank">
|
||||
<img class="lazy" src="/images/swagger.png" width="300" height="150"/>
|
||||
</a>
|
||||
<div class="caption">
|
||||
<h3>
|
||||
<a href="@IOTHttpApiHostConst.SwaggerUiEndPoint" target="_blank">SwaggerUI</a>
|
||||
<a href="@IoTHttpApiHostConst.SwaggerUiEndPoint" target="_blank">SwaggerUI</a>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
@ -40,36 +40,36 @@
|
||||
|
||||
@* <div class="col-sm-6 col-md-4 col-lg-3"> *@
|
||||
@* <div class="thumbnail" style="height: 180px"> *@
|
||||
@* <a href="@IOTHttpApiHostConst.HangfireDashboardEndPoint" target="_blank"> *@
|
||||
@* <a href="@IoTHttpApiHostConst.HangfireDashboardEndPoint" target="_blank"> *@
|
||||
@* <img class="lazy" src="/images/hangfire.png" width="300" height="150"/> *@
|
||||
@* </a> *@
|
||||
@* <div class="caption"> *@
|
||||
@* <h3> *@
|
||||
@* <a href="@IOTHttpApiHostConst.HangfireDashboardEndPoint" target="_blank">Hangfire面板</a> *@
|
||||
@* <a href="@IoTHttpApiHostConst.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="@IOTHttpApiHostConst.MiniprofilerEndPoint" target="_blank">
|
||||
<a href="@IoTHttpApiHostConst.MiniprofilerEndPoint" target="_blank">
|
||||
<img class="lazy" src="/images/miniprofiler.png" width="300" height="150"/>
|
||||
</a>
|
||||
<div class="caption">
|
||||
<h3>
|
||||
<a href="@IOTHttpApiHostConst.MiniprofilerEndPoint" target="_blank">Miniprofiler</a>
|
||||
<a href="@IoTHttpApiHostConst.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="@IOTHttpApiHostConst.MoreEndPoint" target="_blank">
|
||||
<a href="@IoTHttpApiHostConst.MoreEndPoint" target="_blank">
|
||||
<img class="lazy" src="/images/more.png" width="300" height="150"/>
|
||||
</a>
|
||||
<div class="caption">
|
||||
<h3>
|
||||
<a href="@IOTHttpApiHostConst.MoreEndPoint" target="_blank">了解更多...</a>
|
||||
<a href="@IoTHttpApiHostConst.MoreEndPoint" target="_blank">了解更多...</a>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
@ -1,6 +1,6 @@
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
|
||||
namespace JiShe.IOT.Pages
|
||||
namespace JiShe.IoT.Pages
|
||||
{
|
||||
public class Monitor : PageModel
|
||||
{
|
||||
48
host/JiShe.IoT.HttpApi.Host/Program.cs
Normal file
@ -0,0 +1,48 @@
|
||||
using Serilog.Events;
|
||||
|
||||
namespace JiShe.IoT;
|
||||
|
||||
public class Program
|
||||
{
|
||||
public static async Task<int> Main(string[] args)
|
||||
{
|
||||
Log.Logger = new LoggerConfiguration()
|
||||
.WriteTo.Async(c => c.File("Logs/logs.txt"))
|
||||
.WriteTo.Async(c => c.Console())
|
||||
.CreateBootstrapLogger();
|
||||
|
||||
try
|
||||
{
|
||||
Log.Information("JiShe.ServicePro.HttpApi.Host.");
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
builder.Host
|
||||
.AddAppSettingsSecretsJson()
|
||||
.UseAutofac()
|
||||
.UseSerilog((context, loggerConfiguration) =>
|
||||
{
|
||||
SerilogToEsExtensions.SetSerilogConfiguration(
|
||||
loggerConfiguration,
|
||||
context.Configuration);
|
||||
});
|
||||
await builder.AddApplicationAsync<JiShe.IoT.IoTHttpApiHostModule>();
|
||||
var app = builder.Build();
|
||||
await app.InitializeApplicationAsync();
|
||||
await app.RunAsync();
|
||||
return 0;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (ex is HostAbortedException)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
|
||||
Log.Fatal(ex, "Host terminated unexpectedly!");
|
||||
return 1;
|
||||
}
|
||||
finally
|
||||
{
|
||||
await Log.CloseAndFlushAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"profiles": {
|
||||
"JiShe.IOT.HttpApi.Host": {
|
||||
"JiShe.IoT.HttpApi.Host": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"applicationUrl": "http://localhost:44315",
|
||||
63
host/JiShe.IoT.HttpApi.Host/appsettings.Development.json
Normal file
@ -0,0 +1,63 @@
|
||||
{
|
||||
"App": {
|
||||
"SelfUrl": "http://localhost:44315",
|
||||
"CorsOrigins": "https://*.IoT.com,http://localhost:4200,http://localhost:3100,http://localhost:80,http://localhost"
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"Default": "Data Source=118.190.144.92;Port=33306;Database=JiSheIoTProDB;uid=root;pwd=admin123;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true;",
|
||||
"PrepayDB": "server=118.190.144.92;database=jishe.sysdb;uid=sa;pwd=admin@2023;Encrypt=False;Trust Server Certificate=False",
|
||||
"EnergyDB": "server=118.190.144.92;database=db_energy;uid=sa;pwd=admin@2023;Encrypt=False;Trust Server Certificate=False"
|
||||
},
|
||||
"Hangfire": {
|
||||
"Redis": {
|
||||
"Host": "192.168.5.9:6380,password=1q2w3e!@#",
|
||||
"DB": "2"
|
||||
}
|
||||
},
|
||||
"Redis": {
|
||||
"Configuration": "192.168.5.9:6380,password=1q2w3e!@#,defaultdatabase=5"
|
||||
},
|
||||
"Kafka": {
|
||||
"BootstrapServers": "192.168.5.9:29092,192.168.5.9:39092,192.168.5.9:49092",
|
||||
"EnableFilter": true,
|
||||
"EnableAuthorization": false,
|
||||
"SaslUserName": "lixiao",
|
||||
"SaslPassword": "lixiao1980",
|
||||
"KafkaReplicationFactor": 3,
|
||||
"NumPartitions": 30,
|
||||
"TaskThreadCount": -1,
|
||||
"FirstCollectionTime": "2025-04-22 16:07:00"
|
||||
},
|
||||
"IoTDBOptions": {
|
||||
"UserName": "root",
|
||||
"Password": "root",
|
||||
"ClusterList": [ "121.42.175.177:16667" ],
|
||||
"PoolSize": 32,
|
||||
"DataBaseName": "energy",
|
||||
"OpenDebugMode": true,
|
||||
"UseTableSessionPoolByDefault": false
|
||||
},
|
||||
"Jwt": {
|
||||
"Audience": "JiShe.IoT",
|
||||
"SecurityKey": "dzehzRz9a8asdfasfdadfasdfasdfafsdadfasbasdf=",
|
||||
"Issuer": "JiShe.IoT",
|
||||
"ExpirationTime": 2
|
||||
},
|
||||
"Cap": {
|
||||
"RabbitMq": {
|
||||
"HostName": "localhost",
|
||||
"UserName": "admin",
|
||||
"Password": "1q2w3E*",
|
||||
"Port": 5672
|
||||
}
|
||||
},
|
||||
"FreeRedisOptions": {
|
||||
"ConnectionString": "192.168.5.9:6380,password=1q2w3e!@#,defaultdatabase=1",
|
||||
"UseDistributedCache": true
|
||||
},
|
||||
"FreeSqlProviderOptions": {
|
||||
"UsePrepayDB": true,
|
||||
"UseEnergyDB": false,
|
||||
"PrintLog": false
|
||||
}
|
||||
}
|
||||
32
host/JiShe.IoT.HttpApi.Host/appsettings.Production.json
Normal file
@ -0,0 +1,32 @@
|
||||
{
|
||||
"App": {
|
||||
"SelfUrl": "http://localhost:44315",
|
||||
"CorsOrigins": "https://*.IoT.com,http://localhost:4200,http://localhost:3100,http://localhost:80,http://localhost"
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"Default": "Data Source=localhost;Port=3306;Database=JiSheIoTProDB;uid=root;pwd=IFKy!Cufe3V9sYcz;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true"
|
||||
},
|
||||
"Redis": {
|
||||
"Configuration": "localhost,password=1q2w3E*,defaultdatabase=1"
|
||||
},
|
||||
"Jwt": {
|
||||
"Audience": "JiShe.IoT",
|
||||
"SecurityKey": "dzehzRz9a8asdfasfdadfasdfasdfafsdadfasbasdf=",
|
||||
"Issuer": "JiShe.IoT",
|
||||
"ExpirationTime": 2
|
||||
},
|
||||
"Cap": {
|
||||
"RabbitMq": {
|
||||
"HostName": "localhost",
|
||||
"UserName": "admin",
|
||||
"Password": "1q2w3E*",
|
||||
"Port": 5672
|
||||
}
|
||||
},
|
||||
"Hangfire": {
|
||||
"Redis": {
|
||||
"Host": "localhost,password=1q2w3E*",
|
||||
"DB": "2"
|
||||
}
|
||||
}
|
||||
}
|
||||
36
host/JiShe.IoT.HttpApi.Host/appsettings.json
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
"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://*.IoT.com,http://localhost:4200,http://localhost:3100"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
@ -1,18 +0,0 @@
|
||||
namespace JiShe.IOT
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(IOTDomainSharedModule),
|
||||
typeof(AbpObjectExtendingModule),
|
||||
typeof(BasicManagementApplicationContractsModule),
|
||||
typeof(NotificationManagementApplicationContractsModule),
|
||||
typeof(DataDictionaryManagementApplicationContractsModule),
|
||||
typeof(LanguageManagementApplicationContractsModule)
|
||||
)]
|
||||
public class IOTApplicationContractsModule : AbpModule
|
||||
{
|
||||
public override void PreConfigureServices(ServiceConfigurationContext context)
|
||||
{
|
||||
IOTDtoExtensions.Configure();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,23 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<RootNamespace>JiShe.IOT</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\JiShe.IOT.Domain.Shared\JiShe.IOT.Domain.Shared.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.ObjectExtending"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Lion.AbpPro.BasicManagement.Application.Contracts"/>
|
||||
<PackageReference Include="Lion.AbpPro.NotificationManagement.Application.Contracts"/>
|
||||
<PackageReference Include="Lion.AbpPro.DataDictionaryManagement.Application.Contracts"/>
|
||||
<PackageReference Include="Lion.AbpPro.LanguageManagement.Application.Contracts"/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@ -1,7 +0,0 @@
|
||||
namespace JiShe.IOT.Permissions
|
||||
{
|
||||
public static class IOTPermissions
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
namespace JiShe.IOT
|
||||
{
|
||||
/* Inherit your application services from this class.
|
||||
*/
|
||||
public abstract class IOTAppService : ApplicationService
|
||||
{
|
||||
protected IOTAppService()
|
||||
{
|
||||
LocalizationResource = typeof(IOTResource);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,10 +0,0 @@
|
||||
namespace JiShe.IOT
|
||||
{
|
||||
public class IOTApplicationAutoMapperProfile : Profile
|
||||
{
|
||||
public IOTApplicationAutoMapperProfile()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,23 +0,0 @@
|
||||
namespace JiShe.IOT
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(IOTDomainModule),
|
||||
typeof(IOTApplicationContractsModule),
|
||||
typeof(BasicManagementApplicationModule),
|
||||
typeof(NotificationManagementApplicationModule),
|
||||
typeof(DataDictionaryManagementApplicationModule),
|
||||
typeof(LanguageManagementApplicationModule),
|
||||
typeof(IOTFreeSqlModule)
|
||||
)]
|
||||
public class IOTApplicationModule : AbpModule
|
||||
{
|
||||
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||
{
|
||||
Configure<AbpAutoMapperOptions>(options =>
|
||||
{
|
||||
options.AddMaps<IOTApplicationModule>();
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,26 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<RootNamespace>JiShe.IOT</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\JiShe.IOT.Domain\JiShe.IOT.Domain.csproj"/>
|
||||
<ProjectReference Include="..\JiShe.IOT.Application.Contracts\JiShe.IOT.Application.Contracts.csproj"/>
|
||||
<ProjectReference Include="..\JiShe.IOT.FreeSqlRepository\JiShe.IOT.FreeSqlRepository.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Lion.AbpPro.BasicManagement.Application"/>
|
||||
<PackageReference Include="Lion.AbpPro.NotificationManagement.Application"/>
|
||||
<PackageReference Include="Lion.AbpPro.DataDictionaryManagement.Application"/>
|
||||
<PackageReference Include="Lion.AbpPro.LanguageManagement.Application"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.BackgroundJobs.HangFire"/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@ -1,2 +0,0 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
[assembly:InternalsVisibleToAttribute("JiShe.IOT.Application.Tests")]
|
||||
@ -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", "JiShe.IOT.DbMigrator.dll"]
|
||||
|
||||
|
||||
@ -1,5 +0,0 @@
|
||||
{
|
||||
"ConnectionStrings": {
|
||||
"Default": "Data Source=118.190.144.92;Port=33306;Database=JiSheIOTDB;uid=root;pwd=admin123;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true"
|
||||
}
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
namespace JiShe.IOT
|
||||
{
|
||||
public static class IOTDomainErrorCodes
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,44 +0,0 @@
|
||||
namespace JiShe.IOT
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(BasicManagementDomainSharedModule),
|
||||
typeof(NotificationManagementDomainSharedModule),
|
||||
typeof(DataDictionaryManagementDomainSharedModule),
|
||||
typeof(LanguageManagementDomainSharedModule),
|
||||
typeof(AbpProCoreModule)
|
||||
)]
|
||||
public class IOTDomainSharedModule : AbpModule
|
||||
{
|
||||
public override void PreConfigureServices(ServiceConfigurationContext context)
|
||||
{
|
||||
IOTGlobalFeatureConfigurator.Configure();
|
||||
IOTModuleExtensionConfigurator.Configure();
|
||||
}
|
||||
|
||||
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||
{
|
||||
Configure<AbpVirtualFileSystemOptions>(options =>
|
||||
{
|
||||
options.FileSets.AddEmbedded<IOTDomainSharedModule>(IOTDomainSharedConsts.NameSpace);
|
||||
});
|
||||
|
||||
Configure<AbpLocalizationOptions>(options =>
|
||||
{
|
||||
options.Resources
|
||||
.Add<IOTResource>(IOTDomainSharedConsts.DefaultCultureName)
|
||||
.AddVirtualJson("/Localization/IOT")
|
||||
.AddBaseTypes(typeof(BasicManagementResource))
|
||||
.AddBaseTypes(typeof(AbpTimingResource));
|
||||
|
||||
options.DefaultResourceType = typeof(IOTResource);
|
||||
});
|
||||
|
||||
Configure<AbpExceptionLocalizationOptions>(options =>
|
||||
{
|
||||
options.MapCodeNamespace(IOTDomainSharedConsts.NameSpace, typeof(IOTResource));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<RootNamespace>JiShe.IOT</RootNamespace>
|
||||
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Localization\IOT\*.json"/>
|
||||
<Content Remove="Localization\IOT\*.json"/>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Lion.AbpPro.Core"/>
|
||||
<PackageReference Include="Lion.AbpPro.BasicManagement.Domain.Shared"/>
|
||||
<PackageReference Include="Lion.AbpPro.NotificationManagement.Domain.Shared"/>
|
||||
<PackageReference Include="Lion.AbpPro.DataDictionaryManagement.Domain.Shared"/>
|
||||
<PackageReference Include="Lion.AbpPro.LanguageManagement.Domain.Shared"/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@ -1,8 +0,0 @@
|
||||
namespace JiShe.IOT
|
||||
{
|
||||
[LocalizationResourceName("IOT")]
|
||||
public class IOTResource
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
namespace JiShe.IOT.Data
|
||||
{
|
||||
public interface IIOTDbSchemaMigrator
|
||||
{
|
||||
Task MigrateAsync();
|
||||
}
|
||||
}
|
||||
@ -1,9 +0,0 @@
|
||||
namespace JiShe.IOT
|
||||
{
|
||||
public static class IOTDbProperties
|
||||
{
|
||||
public const string DbTablePrefix = "Abp";
|
||||
|
||||
public const string DbSchema = null;
|
||||
}
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<RootNamespace>JiShe.IOT</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\JiShe.IOT.Domain.Shared\JiShe.IOT.Domain.Shared.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Lion.AbpPro.BasicManagement.Domain"/>
|
||||
<PackageReference Include="Lion.AbpPro.NotificationManagement.Domain"/>
|
||||
<PackageReference Include="Lion.AbpPro.DataDictionaryManagement.Domain"/>
|
||||
<PackageReference Include="Lion.AbpPro.LanguageManagement.Domain"/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@ -1,3 +0,0 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
[assembly:InternalsVisibleToAttribute("JiShe.IOT.Domain.Tests")]
|
||||
[assembly:InternalsVisibleToAttribute("JiShe.IOT.TestBase")]
|
||||
@ -1,7 +0,0 @@
|
||||
namespace JiShe.IOT.Settings
|
||||
{
|
||||
public static class IOTSettings
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,8 +0,0 @@
|
||||
namespace JiShe.IOT.EntityFrameworkCore
|
||||
{
|
||||
[ConnectionStringName("Default")]
|
||||
public interface IIOTDbContext : IEfCoreDbContext
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
using Volo.Abp.EntityFrameworkCore.Modeling;
|
||||
|
||||
namespace JiShe.IOT.EntityFrameworkCore;
|
||||
|
||||
public static class IOTDbContextModelCreatingExtensions
|
||||
{
|
||||
public static void ConfigureIOT(this ModelBuilder builder)
|
||||
{
|
||||
Check.NotNull(builder, nameof(builder));
|
||||
}
|
||||
}
|
||||
@ -1,25 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<RootNamespace>JiShe.IOT</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\JiShe.IOT.Domain\JiShe.IOT.Domain.csproj"/>
|
||||
<PackageReference Include="Volo.Abp.EntityFrameworkCore.MySQL"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Lion.AbpPro.BasicManagement.EntityFrameworkCore"/>
|
||||
<PackageReference Include="Lion.AbpPro.NotificationManagement.EntityFrameworkCore"/>
|
||||
<PackageReference Include="Lion.AbpPro.DataDictionaryManagement.EntityFrameworkCore"/>
|
||||
<PackageReference Include="Lion.AbpPro.LanguageManagement.EntityFrameworkCore"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
|
||||
<PrivateAssets>compile; contentFiles; build; buildMultitargeting; buildTransitive; analyzers; native</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@ -1,2 +0,0 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
[assembly:InternalsVisibleToAttribute("JiShe.IOT.EntityFrameworkCore.Tests")]
|
||||
@ -1,14 +0,0 @@
|
||||
namespace JiShe.IOT.FreeSqlRepository;
|
||||
|
||||
public abstract class FreeSqlBasicRepository : DomainService
|
||||
{
|
||||
protected IFreeSql FreeSql => LazyServiceProvider.LazyGetRequiredService<IFreeSql>();
|
||||
|
||||
private ICancellationTokenProvider CancellationTokenProvider =>
|
||||
LazyServiceProvider.LazyGetService<ICancellationTokenProvider>(NullCancellationTokenProvider.Instance);
|
||||
|
||||
protected virtual CancellationToken GetCancellationToken(CancellationToken preferredValue = default)
|
||||
{
|
||||
return CancellationTokenProvider.FallbackToProvider(preferredValue);
|
||||
}
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
// Global using directives
|
||||
|
||||
global using Microsoft.Extensions.Configuration;
|
||||
global using Microsoft.Extensions.DependencyInjection;
|
||||
global using Volo.Abp.Domain.Services;
|
||||
global using Volo.Abp.Modularity;
|
||||
global using Volo.Abp.Threading;
|
||||
@ -1,15 +0,0 @@
|
||||
namespace JiShe.IOT.FreeSqlRepository;
|
||||
|
||||
public class IOTFreeSqlModule : AbpModule
|
||||
{
|
||||
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||
{
|
||||
var configuration = context.Services.GetConfiguration();
|
||||
var connectionString = configuration.GetConnectionString("Default");
|
||||
var freeSql = new FreeSql.FreeSqlBuilder()
|
||||
.UseConnectionString(FreeSql.DataType.MySql, connectionString)
|
||||
.Build();
|
||||
|
||||
context.Services.AddSingleton<IFreeSql>(freeSql);
|
||||
}
|
||||
}
|
||||
@ -1,17 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="FreeSql"/>
|
||||
<PackageReference Include="FreeSql.Provider.MysqlConnector"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\JiShe.IOT.Domain\JiShe.IOT.Domain.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@ -1,27 +0,0 @@
|
||||
using Lion.AbpPro.BasicManagement;
|
||||
using Lion.AbpPro.DataDictionaryManagement;
|
||||
using Lion.AbpPro.LanguageManagement;
|
||||
using Lion.AbpPro.NotificationManagement;
|
||||
|
||||
namespace JiShe.IOT
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(IOTApplicationContractsModule),
|
||||
typeof(BasicManagementHttpApiClientModule),
|
||||
typeof(NotificationManagementHttpApiClientModule),
|
||||
typeof(DataDictionaryManagementHttpApiClientModule),
|
||||
typeof(LanguageManagementHttpApiClientModule)
|
||||
)]
|
||||
public class IOTHttpApiClientModule : AbpModule
|
||||
{
|
||||
public const string RemoteServiceName = "Default";
|
||||
|
||||
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||
{
|
||||
context.Services.AddHttpClientProxies(
|
||||
typeof(IOTApplicationContractsModule).Assembly,
|
||||
RemoteServiceName
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<RootNamespace>JiShe.IOT</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\JiShe.IOT.Application.Contracts\JiShe.IOT.Application.Contracts.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Lion.AbpPro.BasicManagement.HttpApi.Client"/>
|
||||
<PackageReference Include="Lion.AbpPro.NotificationManagement.HttpApi.Client"/>
|
||||
<PackageReference Include="Lion.AbpPro.DataDictionaryManagement.HttpApi.Client"/>
|
||||
<PackageReference Include="Lion.AbpPro.LanguageManagement.HttpApi.Client"/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@ -1,12 +0,0 @@
|
||||
namespace JiShe.IOT.Controllers
|
||||
{
|
||||
/* Inherit your controllers from this class.
|
||||
*/
|
||||
public abstract class IOTController : AbpController
|
||||
{
|
||||
protected IOTController()
|
||||
{
|
||||
LocalizationResource = typeof(IOTResource);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,23 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<RootNamespace>JiShe.IOT</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\JiShe.IOT.Application.Contracts\JiShe.IOT.Application.Contracts.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.Annotations"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Lion.AbpPro.BasicManagement.HttpApi"/>
|
||||
<PackageReference Include="Lion.AbpPro.NotificationManagement.HttpApi"/>
|
||||
<PackageReference Include="Lion.AbpPro.DataDictionaryManagement.HttpApi"/>
|
||||
<PackageReference Include="Lion.AbpPro.LanguageManagement.HttpApi"/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@ -2,10 +2,10 @@
|
||||
|
||||
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 JiShe.ServicePro.BasicManagement;
|
||||
global using JiShe.ServicePro.DataDictionaryManagement;
|
||||
global using JiShe.ServicePro.LanguageManagement;
|
||||
global using JiShe.ServicePro.NotificationManagement;
|
||||
global using Volo.Abp.Application.Services;
|
||||
global using Volo.Abp.Authorization.Permissions;
|
||||
global using Volo.Abp.DependencyInjection;
|
||||
@ -0,0 +1,25 @@
|
||||
using JiShe.ServicePro.CodeManagement;
|
||||
using JiShe.ServicePro.DynamicMenuManagement;
|
||||
using JiShe.ServicePro.TemplateManagement;
|
||||
|
||||
namespace JiShe.IoT
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(IoTDomainSharedModule),
|
||||
typeof(AbpObjectExtendingModule),
|
||||
typeof(BasicManagementApplicationContractsModule),
|
||||
typeof(NotificationManagementApplicationContractsModule),
|
||||
typeof(DataDictionaryManagementApplicationContractsModule),
|
||||
typeof(LanguageManagementApplicationContractsModule),
|
||||
typeof(CodeManagementApplicationContractsModule),
|
||||
typeof(TemplateManagementApplicationContractsModule),
|
||||
typeof(DynamicMenuManagementApplicationContractsModule)
|
||||
)]
|
||||
public class IoTApplicationContractsModule : AbpModule
|
||||
{
|
||||
public override void PreConfigureServices(ServiceConfigurationContext context)
|
||||
{
|
||||
IoTDtoExtensions.Configure();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
namespace JiShe.IOT
|
||||
namespace JiShe.IoT
|
||||
{
|
||||
public static class IOTDtoExtensions
|
||||
public static class IoTDtoExtensions
|
||||
{
|
||||
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<RootNamespace>JiShe.IoT</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\JiShe.IoT.Domain.Shared\JiShe.IoT.Domain.Shared.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.ObjectExtending"/>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="JiShe.ServicePro.BasicManagement.Application.Contracts"/>
|
||||
<PackageReference Include="JiShe.ServicePro.NotificationManagement.Application.Contracts"/>
|
||||
<PackageReference Include="JiShe.ServicePro.DataDictionaryManagement.Application.Contracts"/>
|
||||
<PackageReference Include="JiShe.ServicePro.LanguageManagement.Application.Contracts"/>
|
||||
<PackageReference Include="JiShe.ServicePro.CodeManagement.Application.Contracts"/>
|
||||
<PackageReference Include="JiShe.ServicePro.TemplateManagement.Application.Contracts"/>
|
||||
<PackageReference Include="JiShe.ServicePro.DynamicMenuManagement.Application.Contracts"/>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@ -1,4 +1,4 @@
|
||||
namespace JiShe.IOT.Jobs
|
||||
namespace JiShe.IoT.Jobs
|
||||
{
|
||||
public interface IRecurringJob : ITransientDependency
|
||||
{
|
||||
@ -1,6 +1,6 @@
|
||||
namespace JiShe.IOT.Permissions
|
||||
namespace JiShe.IoT.Permissions
|
||||
{
|
||||
public class IOTPermissionDefinitionProvider : PermissionDefinitionProvider
|
||||
public class IoTPermissionDefinitionProvider : PermissionDefinitionProvider
|
||||
{
|
||||
public override void Define(IPermissionDefinitionContext context)
|
||||
{
|
||||
@ -11,7 +11,7 @@ namespace JiShe.IOT.Permissions
|
||||
|
||||
private static LocalizableString L(string name)
|
||||
{
|
||||
return LocalizableString.Create<IOTResource>(name);
|
||||
return LocalizableString.Create<IoTResource>(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,7 @@
|
||||
namespace JiShe.IoT.Permissions
|
||||
{
|
||||
public static class IoTPermissions
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@ -4,12 +4,11 @@ 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 JiShe.IOT.FreeSqlRepository;
|
||||
global using JiShe.IOT.Permissions;
|
||||
global using JiShe.ServicePro.BasicManagement;
|
||||
global using JiShe.ServicePro.DataDictionaryManagement;
|
||||
global using JiShe.ServicePro.LanguageManagement;
|
||||
global using JiShe.ServicePro.NotificationManagement;
|
||||
global using JiShe.IoT.Permissions;
|
||||
global using Microsoft.AspNetCore.Authorization;
|
||||
global using Microsoft.Extensions.Configuration;
|
||||
global using Volo.Abp.Application.Services;
|
||||
18
src/JiShe.IoT.Application/IoTAppService.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using JiShe.ServicePro.FreeRedisProvider;
|
||||
using JiShe.ServicePro.FreeSqlProvider;
|
||||
|
||||
namespace JiShe.IoT
|
||||
{
|
||||
/* Inherit your application services from this class.
|
||||
*/
|
||||
public abstract class IoTAppService : ApplicationService
|
||||
{
|
||||
protected IFreeSqlProvider FreeSqlDbContext => LazyServiceProvider.LazyGetRequiredService<IFreeSqlProvider>();
|
||||
protected IFreeRedisProviderService FreeRedis => LazyServiceProvider.LazyGetRequiredService<IFreeRedisProviderService>();
|
||||
|
||||
protected IoTAppService()
|
||||
{
|
||||
LocalizationResource = typeof(IoTResource);
|
||||
}
|
||||
}
|
||||
}
|
||||
10
src/JiShe.IoT.Application/IoTApplicationAutoMapperProfile.cs
Normal file
@ -0,0 +1,10 @@
|
||||
namespace JiShe.IoT
|
||||
{
|
||||
public class IoTApplicationAutoMapperProfile : Profile
|
||||
{
|
||||
public IoTApplicationAutoMapperProfile()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
32
src/JiShe.IoT.Application/IoTApplicationModule.cs
Normal file
@ -0,0 +1,32 @@
|
||||
using JiShe.ServicePro.CodeManagement;
|
||||
using JiShe.ServicePro.DynamicMenuManagement;
|
||||
using JiShe.ServicePro.FreeRedisProvider;
|
||||
using JiShe.ServicePro.FreeSqlProvider;
|
||||
using JiShe.ServicePro.TemplateManagement;
|
||||
|
||||
namespace JiShe.IoT
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(IoTDomainModule),
|
||||
typeof(IoTApplicationContractsModule),
|
||||
typeof(BasicManagementApplicationModule),
|
||||
typeof(NotificationManagementApplicationModule),
|
||||
typeof(DataDictionaryManagementApplicationModule),
|
||||
typeof(LanguageManagementApplicationModule),
|
||||
typeof(CodeManagementApplicationModule),
|
||||
typeof(TemplateManagementApplicationModule),
|
||||
typeof(DynamicMenuManagementApplicationModule),
|
||||
typeof(FreeRedisProviderModule)
|
||||
)]
|
||||
public class IoTApplicationModule : AbpModule
|
||||
{
|
||||
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||
{
|
||||
Configure<AbpAutoMapperOptions>(options =>
|
||||
{
|
||||
options.AddMaps<IoTApplicationModule>();
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
29
src/JiShe.IoT.Application/JiShe.IoT.Application.csproj
Normal file
@ -0,0 +1,29 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<RootNamespace>JiShe.IoT</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\JiShe.IoT.Domain\JiShe.IoT.Domain.csproj" />
|
||||
<ProjectReference Include="..\JiShe.IoT.Application.Contracts\JiShe.IoT.Application.Contracts.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="JiShe.ServicePro.BasicManagement.Application" />
|
||||
<PackageReference Include="JiShe.ServicePro.NotificationManagement.Application" />
|
||||
<PackageReference Include="JiShe.ServicePro.DataDictionaryManagement.Application" />
|
||||
<PackageReference Include="JiShe.ServicePro.LanguageManagement.Application" />
|
||||
<PackageReference Include="JiShe.ServicePro.CodeManagement.Application" />
|
||||
<PackageReference Include="JiShe.ServicePro.TemplateManagement.Application" />
|
||||
<PackageReference Include="JiShe.ServicePro.DynamicMenuManagement.Application" />
|
||||
<PackageReference Include="JiShe.ServicePro.FreeRedisProvider" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Volo.Abp.BackgroundJobs.HangFire" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@ -1,4 +1,4 @@
|
||||
namespace JiShe.IOT.Jobs
|
||||
namespace JiShe.IoT.Jobs
|
||||
{
|
||||
public class TestJob : IRecurringJob
|
||||
{
|
||||
2
src/JiShe.IoT.Application/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,2 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
[assembly:InternalsVisibleToAttribute("JiShe.IoT.Application.Tests")]
|
||||
@ -1,6 +1,6 @@
|
||||
using Volo.Abp.Data;
|
||||
|
||||
namespace JiShe.IOT.DbMigrator
|
||||
namespace JiShe.IoT.DbMigrator
|
||||
{
|
||||
public class DbMigratorHostedService : IHostedService
|
||||
{
|
||||
@ -15,7 +15,7 @@ namespace JiShe.IOT.DbMigrator
|
||||
|
||||
public async Task StartAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
using (var application = await AbpApplicationFactory.CreateAsync<IOTDbMigratorModule>(options =>
|
||||
using (var application = await AbpApplicationFactory.CreateAsync<IoTDbMigratorModule>(options =>
|
||||
{
|
||||
options.Services.ReplaceConfiguration(_configuration);
|
||||
options.UseAutofac();
|
||||
@ -28,7 +28,7 @@ namespace JiShe.IOT.DbMigrator
|
||||
|
||||
await application
|
||||
.ServiceProvider
|
||||
.GetRequiredService<IOTDbMigrationService>()
|
||||
.GetRequiredService<IoTDbMigrationService>()
|
||||
.MigrateAsync();
|
||||
|
||||
await application.ShutdownAsync();
|
||||
@ -4,8 +4,8 @@ global using System;
|
||||
global using System.IO;
|
||||
global using System.Threading;
|
||||
global using System.Threading.Tasks;
|
||||
global using JiShe.IOT.Data;
|
||||
global using JiShe.IOT.EntityFrameworkCore;
|
||||
global using JiShe.IoT.Data;
|
||||
global using JiShe.IoT.EntityFrameworkCore;
|
||||
global using Microsoft.Extensions.Configuration;
|
||||
global using Microsoft.Extensions.DependencyInjection;
|
||||
global using Microsoft.Extensions.Hosting;
|
||||
@ -1,13 +1,13 @@
|
||||
using Volo.Abp.Localization;
|
||||
|
||||
namespace JiShe.IOT.DbMigrator
|
||||
namespace JiShe.IoT.DbMigrator
|
||||
{
|
||||
[DependsOn(
|
||||
typeof(AbpAutofacModule),
|
||||
typeof(IOTEntityFrameworkCoreModule),
|
||||
typeof(IOTApplicationContractsModule)
|
||||
typeof(IoTEntityFrameworkCoreModule),
|
||||
typeof(IoTApplicationContractsModule)
|
||||
)]
|
||||
public class IOTDbMigratorModule : AbpModule
|
||||
public class IoTDbMigratorModule : AbpModule
|
||||
{
|
||||
public override void ConfigureServices(ServiceConfigurationContext context)
|
||||
{
|
||||