diff --git a/aspnet-core/Directory.Build.props b/aspnet-core/Directory.Build.props index 29c76653..26d8355b 100644 --- a/aspnet-core/Directory.Build.props +++ b/aspnet-core/Directory.Build.props @@ -2,7 +2,6 @@ 4.4.0 - 5.1.4 5.0.12 13.0.1 @@ -30,9 +29,7 @@ 17.0.0 6.2.3 2.5.200 - - 2.5.200 - + 4.2.22 \ No newline at end of file diff --git a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application/CompanyName.ProjectName.NotificationManagement.Application.csproj b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application/CompanyName.ProjectName.NotificationManagement.Application.csproj index c09d77a4..30064d41 100644 --- a/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application/CompanyName.ProjectName.NotificationManagement.Application.csproj +++ b/aspnet-core/modules/NotificationManagement/src/CompanyName.ProjectName.NotificationManagement.Application/CompanyName.ProjectName.NotificationManagement.Application.csproj @@ -8,7 +8,7 @@ - + diff --git a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/CompanyName.ProjectName.HttpApi.Host.csproj b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/CompanyName.ProjectName.HttpApi.Host.csproj index f07c4792..3612c81f 100644 --- a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/CompanyName.ProjectName.HttpApi.Host.csproj +++ b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/CompanyName.ProjectName.HttpApi.Host.csproj @@ -32,6 +32,8 @@ + + diff --git a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/Pages/Monitor.cshtml b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/Pages/Monitor.cshtml index 105b7329..862fd3c1 100644 --- a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/Pages/Monitor.cshtml +++ b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/Pages/Monitor.cshtml @@ -50,7 +50,7 @@ - +
- +
+ +
diff --git a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostConsts.cs b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostConsts.cs index afee81fd..5d285ce6 100644 --- a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostConsts.cs +++ b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostConsts.cs @@ -29,6 +29,12 @@ public const string MoreEndPoint = "https://doc.cncore.club/"; + + + /// + /// HMiniprofiler端点 + /// + public const string MiniprofilerEndPoint = "/profiler/results-index"; } } \ No newline at end of file diff --git a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs index 971b88d0..c2321d37 100644 --- a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs +++ b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs @@ -79,6 +79,7 @@ namespace CompanyName.ProjectName ConfigureHangfireMysql(context); ConfigurationCap(context); ConfigurationStsHttpClient(context); + ConfigurationMiniProfiler(context); } public override void OnApplicationInitialization(ApplicationInitializationContext context) @@ -88,6 +89,7 @@ namespace CompanyName.ProjectName app.UseAbpRequestLocalization(); app.UseCorrelationId(); app.UseStaticFiles(); + app.UseMiniProfiler(); app.UseRouting(); app.UseCors(ProjectNameHttpApiHostConsts.DefaultCorsPolicyName); app.UseAuthentication(); @@ -98,7 +100,6 @@ namespace CompanyName.ProjectName } app.UseAuthorization(); - app.UseSwagger(); app.UseAbpSwaggerUI(options => { @@ -114,7 +115,6 @@ namespace CompanyName.ProjectName opts.EnrichDiagnosticContext = SerilogToEsExtensions.EnrichFromRequest; }); app.UseUnitOfWork(); - app.UseConfiguredEndpoints(endpoints => { endpoints.MapHealthChecks("/health"); }); app.UseHangfireDashboard("/hangfire", new DashboardOptions() { @@ -150,7 +150,17 @@ namespace CompanyName.ProjectName }); } - + /// + /// 配置MiniProfiler + /// + /// + private void ConfigurationMiniProfiler(ServiceConfigurationContext context) + { + + context.Services.AddMiniProfiler(options => options.RouteBasePath = "/profiler") + .AddEntityFramework(); + } + /// /// 配置JWT /// diff --git a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/appsettings.Development.json b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/appsettings.json similarity index 100% rename from aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/appsettings.Development.json rename to aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/appsettings.json diff --git a/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/wwwroot/images/miniprofiler.png b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/wwwroot/images/miniprofiler.png new file mode 100644 index 00000000..244c7029 Binary files /dev/null and b/aspnet-core/services/host/CompanyName.ProjectName.HttpApi.Host/wwwroot/images/miniprofiler.png differ diff --git a/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/appsettings.Development.json b/aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/appsettings.json similarity index 100% rename from aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/appsettings.Development.json rename to aspnet-core/services/host/CompanyName.ProjectName.IdentityServer/appsettings.json diff --git a/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/SharedHostingMicroserviceModule.cs b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/SharedHostingMicroserviceModule.cs index 3c93bcb0..5ea8c4ad 100644 --- a/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/SharedHostingMicroserviceModule.cs +++ b/aspnet-core/shared/CompanyName.ProjectName.Shared.Hosting.Microservices/SharedHostingMicroserviceModule.cs @@ -32,6 +32,8 @@ namespace CompanyName.ProjectName ConfigureConsul(context, configuration); } + + private void ConfigureConsul(ServiceConfigurationContext context, IConfiguration configuration) {