|
|
|
@ -26,6 +26,7 @@ using Volo.Abp.AspNetCore.Serilog; |
|
|
|
using Volo.Abp.Autofac; |
|
|
|
using Volo.Abp.AutoMapper; |
|
|
|
using Volo.Abp.Caching; |
|
|
|
using Volo.Abp.Caching.StackExchangeRedis; |
|
|
|
using Volo.Abp.FeatureManagement; |
|
|
|
using Volo.Abp.Http.Client.IdentityModel.Web; |
|
|
|
using Volo.Abp.Identity.Web; |
|
|
|
@ -47,6 +48,7 @@ namespace MyCompanyName.MyProjectName.Web |
|
|
|
typeof(AbpAspNetCoreMvcClientModule), |
|
|
|
typeof(AbpAspNetCoreMvcUiBasicThemeModule), |
|
|
|
typeof(AbpAutofacModule), |
|
|
|
typeof(AbpCachingStackExchangeRedisModule), |
|
|
|
typeof(AbpFeatureManagementWebModule), |
|
|
|
typeof(AbpHttpClientIdentityModelWebModule), |
|
|
|
typeof(AbpIdentityWebModule), |
|
|
|
@ -74,6 +76,7 @@ namespace MyCompanyName.MyProjectName.Web |
|
|
|
var configuration = context.Services.GetConfiguration(); |
|
|
|
|
|
|
|
ConfigureCache(configuration); |
|
|
|
ConfigureRedis(context, configuration, hostingEnvironment); |
|
|
|
ConfigureUrls(configuration); |
|
|
|
ConfigureAuthentication(context, configuration); |
|
|
|
ConfigureAutoMapper(); |
|
|
|
@ -194,11 +197,6 @@ namespace MyCompanyName.MyProjectName.Web |
|
|
|
IConfiguration configuration, |
|
|
|
IWebHostEnvironment hostingEnvironment) |
|
|
|
{ |
|
|
|
context.Services.AddStackExchangeRedisCache(options => |
|
|
|
{ |
|
|
|
options.Configuration = configuration["Redis:Configuration"]; |
|
|
|
}); |
|
|
|
|
|
|
|
if (!hostingEnvironment.IsDevelopment()) |
|
|
|
{ |
|
|
|
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]); |
|
|
|
|