| | |
| | | }); |
| | | Configure<AbpAuditingOptions>(options => |
| | | { |
| | | options.IsEnabledForGetRequests = false; |
| | | options.IsEnabledForGetRequests = true; |
| | | options.ApplicationName = "LifePaymentService"; |
| | | }); |
| | | Configure<AbpUnitOfWorkOptions>(options => |
| | |
| | | cacheOptions.KeyPrefix = "LifePaymentServices_"; |
| | | cacheOptions.GlobalCacheEntryOptions.SlidingExpiration = TimeSpan.FromMinutes(20); |
| | | }); |
| | | this.Configure<OssSettings>(configuration.GetSection("ossSettings")); |
| | | this.Configure<ACOOLYOption>(configuration.GetSection("ACOOLY")); |
| | | this.Configure<Config>("AliPayEcsign", configuration.GetSection("AliPayEcsign")); |
| | | this.Configure<InformationOption>(configuration.GetSection("WeiXinCgi")); |
| | | this.Configure<InitSetting>(configuration.GetSection("InitSetting")); |
| | | } |
| | | |
| | | public override void OnApplicationInitialization(ApplicationInitializationContext context) |
| | |
| | | app.UseIdentityServer(); |
| | | app.UseAuthorization(); |
| | | app.UseAbpClaimsMap(); |
| | | #if DEBUG |
| | | app.UseSwagger(); |
| | | app.UseSwaggerUI(options => |
| | | |
| | | var configuration = context.ServiceProvider.GetRequiredService<IConfiguration>(); |
| | | var openSwagger = configuration["OpenSwagger"].ToBoolOrNull(); |
| | | if (openSwagger == true) |
| | | { |
| | | options.SwaggerEndpoint("/swagger/v1/swagger.json", "LifePayment Service API"); |
| | | }); |
| | | #endif |
| | | app.UseSwagger(); |
| | | app.UseSwaggerUI(options => |
| | | { |
| | | options.SwaggerEndpoint("/swagger/v1/swagger.json", "LifePayment Service API"); |
| | | }); |
| | | } |
| | | |
| | | app.UseAuditing(); |
| | | app.UseConfiguredEndpoints(); |
| | | AsyncHelper.RunSync(async () => |