|
|
@ -1,14 +1,12 @@ |
|
|
using DotNetCore.CAP; |
|
|
using DotNetCore.CAP; |
|
|
using Hangfire; |
|
|
|
|
|
using LINGYUN.Abp.AspNetCore.HttpOverrides; |
|
|
using LINGYUN.Abp.AspNetCore.HttpOverrides; |
|
|
using LINGYUN.Abp.AuditLogging.Elasticsearch; |
|
|
using LINGYUN.Abp.AuditLogging.Elasticsearch; |
|
|
using LINGYUN.Abp.Authorization.OrganizationUnits; |
|
|
using LINGYUN.Abp.Authorization.OrganizationUnits; |
|
|
using LINGYUN.Abp.BackgroundJobs.Hangfire; |
|
|
using LINGYUN.Abp.BackgroundTasks.ExceptionHandling; |
|
|
using LINGYUN.Abp.BackgroundWorkers.Hangfire; |
|
|
using LINGYUN.Abp.BackgroundTasks.Quartz; |
|
|
using LINGYUN.Abp.Data.DbMigrator; |
|
|
using LINGYUN.Abp.Data.DbMigrator; |
|
|
using LINGYUN.Abp.EventBus.CAP; |
|
|
using LINGYUN.Abp.EventBus.CAP; |
|
|
using LINGYUN.Abp.ExceptionHandling.Notifications; |
|
|
using LINGYUN.Abp.ExceptionHandling.Notifications; |
|
|
using LINGYUN.Abp.Hangfire.Storage.MySql; |
|
|
|
|
|
using LINGYUN.Abp.Identity.WeChat; |
|
|
using LINGYUN.Abp.Identity.WeChat; |
|
|
using LINGYUN.Abp.IM.SignalR; |
|
|
using LINGYUN.Abp.IM.SignalR; |
|
|
using LINGYUN.Abp.Localization.CultureMap; |
|
|
using LINGYUN.Abp.Localization.CultureMap; |
|
|
@ -21,6 +19,7 @@ using LINGYUN.Abp.Notifications.WeChat.MiniProgram; |
|
|
using LINGYUN.Abp.Saas.EntityFrameworkCore; |
|
|
using LINGYUN.Abp.Saas.EntityFrameworkCore; |
|
|
using LINGYUN.Abp.Serilog.Enrichers.Application; |
|
|
using LINGYUN.Abp.Serilog.Enrichers.Application; |
|
|
using LINGYUN.Abp.Serilog.Enrichers.UniqueId; |
|
|
using LINGYUN.Abp.Serilog.Enrichers.UniqueId; |
|
|
|
|
|
using LINGYUN.Abp.TaskManagement.EntityFrameworkCore; |
|
|
using Microsoft.AspNetCore.Builder; |
|
|
using Microsoft.AspNetCore.Builder; |
|
|
using Microsoft.AspNetCore.Hosting; |
|
|
using Microsoft.AspNetCore.Hosting; |
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
@ -37,9 +36,9 @@ using Volo.Abp.Modularity; |
|
|
using Volo.Abp.PermissionManagement.EntityFrameworkCore; |
|
|
using Volo.Abp.PermissionManagement.EntityFrameworkCore; |
|
|
using Volo.Abp.SettingManagement.EntityFrameworkCore; |
|
|
using Volo.Abp.SettingManagement.EntityFrameworkCore; |
|
|
|
|
|
|
|
|
namespace LY.MicroService.RealtimeMessage |
|
|
namespace LY.MicroService.RealtimeMessage; |
|
|
{ |
|
|
|
|
|
[DependsOn( |
|
|
[DependsOn( |
|
|
typeof(AbpSerilogEnrichersApplicationModule), |
|
|
typeof(AbpSerilogEnrichersApplicationModule), |
|
|
typeof(AbpSerilogEnrichersUniqueIdModule), |
|
|
typeof(AbpSerilogEnrichersUniqueIdModule), |
|
|
typeof(AbpAspNetCoreSerilogModule), |
|
|
typeof(AbpAspNetCoreSerilogModule), |
|
|
@ -48,6 +47,9 @@ namespace LY.MicroService.RealtimeMessage |
|
|
typeof(AbpMessageServiceApplicationModule), |
|
|
typeof(AbpMessageServiceApplicationModule), |
|
|
typeof(AbpMessageServiceHttpApiModule), |
|
|
typeof(AbpMessageServiceHttpApiModule), |
|
|
typeof(AbpIdentityWeChatModule), |
|
|
typeof(AbpIdentityWeChatModule), |
|
|
|
|
|
typeof(AbpBackgroundTasksQuartzModule), |
|
|
|
|
|
typeof(AbpBackgroundTasksExceptionHandlingModule), |
|
|
|
|
|
typeof(TaskManagementEntityFrameworkCoreModule), |
|
|
typeof(AbpMessageServiceEntityFrameworkCoreModule), |
|
|
typeof(AbpMessageServiceEntityFrameworkCoreModule), |
|
|
typeof(AbpIdentityEntityFrameworkCoreModule), |
|
|
typeof(AbpIdentityEntityFrameworkCoreModule), |
|
|
typeof(AbpSaasEntityFrameworkCoreModule), |
|
|
typeof(AbpSaasEntityFrameworkCoreModule), |
|
|
@ -57,9 +59,6 @@ namespace LY.MicroService.RealtimeMessage |
|
|
typeof(AbpDataDbMigratorModule), |
|
|
typeof(AbpDataDbMigratorModule), |
|
|
typeof(AbpAspNetCoreAuthenticationJwtBearerModule), |
|
|
typeof(AbpAspNetCoreAuthenticationJwtBearerModule), |
|
|
typeof(AbpAuthorizationOrganizationUnitsModule), |
|
|
typeof(AbpAuthorizationOrganizationUnitsModule), |
|
|
typeof(AbpHangfireMySqlStorageModule), |
|
|
|
|
|
typeof(AbpBackgroundJobsHangfireModule), |
|
|
|
|
|
typeof(AbpBackgroundWorkersHangfireModule), |
|
|
|
|
|
typeof(AbpBackgroundWorkersModule), |
|
|
typeof(AbpBackgroundWorkersModule), |
|
|
typeof(AbpIMSignalRModule), |
|
|
typeof(AbpIMSignalRModule), |
|
|
typeof(AbpNotificationsSmsModule), |
|
|
typeof(AbpNotificationsSmsModule), |
|
|
@ -72,8 +71,8 @@ namespace LY.MicroService.RealtimeMessage |
|
|
typeof(AbpLocalizationCultureMapModule), |
|
|
typeof(AbpLocalizationCultureMapModule), |
|
|
typeof(AbpAutofacModule) |
|
|
typeof(AbpAutofacModule) |
|
|
)] |
|
|
)] |
|
|
public partial class RealtimeMessageHttpApiHostModule : AbpModule |
|
|
public partial class RealtimeMessageHttpApiHostModule : AbpModule |
|
|
{ |
|
|
{ |
|
|
private const string DefaultCorsPolicyName = "Default"; |
|
|
private const string DefaultCorsPolicyName = "Default"; |
|
|
|
|
|
|
|
|
public override void PreConfigureServices(ServiceConfigurationContext context) |
|
|
public override void PreConfigureServices(ServiceConfigurationContext context) |
|
|
@ -82,8 +81,8 @@ namespace LY.MicroService.RealtimeMessage |
|
|
|
|
|
|
|
|
PreConfigureApp(); |
|
|
PreConfigureApp(); |
|
|
PreConfigureFeature(); |
|
|
PreConfigureFeature(); |
|
|
PreCongifureHangfire(); |
|
|
|
|
|
PreConfigureCAP(configuration); |
|
|
PreConfigureCAP(configuration); |
|
|
|
|
|
PreConfigureQuartz(configuration); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
public override void ConfigureServices(ServiceConfigurationContext context) |
|
|
@ -94,13 +93,13 @@ namespace LY.MicroService.RealtimeMessage |
|
|
ConfigureDbContext(); |
|
|
ConfigureDbContext(); |
|
|
ConfigureLocalization(); |
|
|
ConfigureLocalization(); |
|
|
ConfigureJsonSerializer(); |
|
|
ConfigureJsonSerializer(); |
|
|
|
|
|
ConfigureBackgroundTasks(); |
|
|
ConfigreExceptionHandling(); |
|
|
ConfigreExceptionHandling(); |
|
|
ConfigureVirtualFileSystem(); |
|
|
ConfigureVirtualFileSystem(); |
|
|
ConfigureCaching(configuration); |
|
|
ConfigureCaching(configuration); |
|
|
ConfigureAuditing(configuration); |
|
|
ConfigureAuditing(configuration); |
|
|
ConfigureSwagger(context.Services); |
|
|
ConfigureSwagger(context.Services); |
|
|
ConfigureMultiTenancy(configuration); |
|
|
ConfigureMultiTenancy(configuration); |
|
|
ConfigureHangfireServer(context.Services); |
|
|
|
|
|
ConfigureCors(context.Services, configuration); |
|
|
ConfigureCors(context.Services, configuration); |
|
|
ConfigureSeedWorker(context.Services, hostingEnvironment.IsDevelopment()); |
|
|
ConfigureSeedWorker(context.Services, hostingEnvironment.IsDevelopment()); |
|
|
ConfigureSecurity(context.Services, configuration, hostingEnvironment.IsDevelopment()); |
|
|
ConfigureSecurity(context.Services, configuration, hostingEnvironment.IsDevelopment()); |
|
|
@ -140,11 +139,7 @@ namespace LY.MicroService.RealtimeMessage |
|
|
// 审计日志
|
|
|
// 审计日志
|
|
|
app.UseAuditing(); |
|
|
app.UseAuditing(); |
|
|
app.UseAbpSerilogEnrichers(); |
|
|
app.UseAbpSerilogEnrichers(); |
|
|
// 将在 2.0.0版本移除
|
|
|
|
|
|
// app.UseHangfireServer();
|
|
|
|
|
|
app.UseHangfireDashboard(); |
|
|
|
|
|
// 路由
|
|
|
// 路由
|
|
|
app.UseConfiguredEndpoints(); |
|
|
app.UseConfiguredEndpoints(); |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
|