|
|
|
@ -1,28 +1,22 @@ |
|
|
|
using EShopOnAbp.CatalogService.DbMigrations; |
|
|
|
using EShopOnAbp.CatalogService.Grpc; |
|
|
|
using EShopOnAbp.CatalogService.MongoDB; |
|
|
|
using EShopOnAbp.Shared.Hosting.AspNetCore; |
|
|
|
using EShopOnAbp.Shared.Hosting.Microservices; |
|
|
|
using Microsoft.AspNetCore.Builder; |
|
|
|
using Microsoft.AspNetCore.Cors; |
|
|
|
using Microsoft.Extensions.Configuration; |
|
|
|
using Microsoft.Extensions.DependencyInjection; |
|
|
|
using Microsoft.Extensions.Hosting; |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.IO; |
|
|
|
using System.Linq; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using EShopOnAbp.CatalogService.Grpc; |
|
|
|
using EShopOnAbp.CatalogService.MongoDB; |
|
|
|
using Microsoft.AspNetCore.Http; |
|
|
|
using Microsoft.Extensions.Configuration; |
|
|
|
using Volo.Abp; |
|
|
|
using Volo.Abp.AspNetCore.Mvc; |
|
|
|
using Volo.Abp.AspNetCore.Mvc.AntiForgery; |
|
|
|
using Volo.Abp.Modularity; |
|
|
|
using Volo.Abp.Threading; |
|
|
|
using Volo.Abp.Uow; |
|
|
|
using Medallion.Threading.Redis; |
|
|
|
using Medallion.Threading; |
|
|
|
using StackExchange.Redis; |
|
|
|
|
|
|
|
namespace EShopOnAbp.CatalogService; |
|
|
|
|
|
|
|
@ -70,12 +64,6 @@ public class CatalogServiceHttpApiHostModule : AbpModule |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
context.Services.AddSingleton<IDistributedLockProvider>(sp => |
|
|
|
{ |
|
|
|
var connection = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]); |
|
|
|
return new RedisDistributedSynchronizationProvider(connection.GetDatabase()); |
|
|
|
}); |
|
|
|
|
|
|
|
Configure<AbpAspNetCoreMvcOptions>(options => |
|
|
|
{ |
|
|
|
options.ConventionalControllers.Create(typeof(CatalogServiceApplicationModule).Assembly, opts => |
|
|
|
|