|
|
|
@ -15,6 +15,7 @@ using Volo.Abp; |
|
|
|
using Volo.Abp.AspNetCore.MultiTenancy; |
|
|
|
using Volo.Abp.AspNetCore.Mvc; |
|
|
|
using Volo.Abp.Autofac; |
|
|
|
using Volo.Abp.Caching; |
|
|
|
using Volo.Abp.Localization; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.VirtualFileSystem; |
|
|
|
@ -41,11 +42,20 @@ namespace MyCompanyName.MyProjectName |
|
|
|
ConfigureAuthentication(context, configuration); |
|
|
|
ConfigureSwagger(context); |
|
|
|
ConfigureLocalization(); |
|
|
|
ConfigureCache(configuration); |
|
|
|
ConfigureVirtualFileSystem(context); |
|
|
|
ConfigureRedis(context, configuration, hostingEnvironment); |
|
|
|
ConfigureCors(context, configuration); |
|
|
|
} |
|
|
|
|
|
|
|
private void ConfigureCache(IConfigurationRoot configuration) |
|
|
|
{ |
|
|
|
Configure<CacheOptions>(options => |
|
|
|
{ |
|
|
|
options.KeyPrefix = "MyProjectName:"; |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
private void ConfigureVirtualFileSystem(ServiceConfigurationContext context) |
|
|
|
{ |
|
|
|
var hostingEnvironment = context.Services.GetHostingEnvironment(); |
|
|
|
|