diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCAPSubscribeInvoker.cs b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCAPSubscribeInvoker.cs index c05487fa..9870c79e 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCAPSubscribeInvoker.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCAPSubscribeInvoker.cs @@ -5,12 +5,13 @@ using Microsoft.Extensions.Internal; namespace Lion.AbpPro.CAP; -public class AbpProCAPSubscribeInvoker +public class AbpProCAPSubscribeInvoker : ISubscribeInvoker { private readonly ConcurrentDictionary _executors; private readonly ISerializer _serializer; private readonly IServiceProvider _serviceProvider; private readonly ICurrentTenant _currentTenant; + public AbpProCAPSubscribeInvoker(IServiceProvider serviceProvider, ISerializer serializer, ICurrentTenant currentTenant) { _serviceProvider = serviceProvider; @@ -95,7 +96,7 @@ public class AbpProCAPSubscribeInvoker { resultObj = await ExecuteWithParameterAsync(executor, obj, executeParameters).ConfigureAwait(false); } - + if (filter != null) { var edContext = new ExecutedContext(context, resultObj); diff --git a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapServiceCollectionExtensions.cs b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapServiceCollectionExtensions.cs index a9c479be..49272527 100644 --- a/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapServiceCollectionExtensions.cs +++ b/aspnet-core/frameworks/src/Lion.AbpPro.CAP/Lion/AbpPro/CAP/AbpProCapServiceCollectionExtensions.cs @@ -6,6 +6,7 @@ public static class AbpProCapServiceCollectionExtensions { context.Services.Replace(ServiceDescriptor.Transient()); context.Services.Replace(ServiceDescriptor.Transient()); + context.Services.AddSingleton(); context.Services.AddTransient(); context.Services.AddCap(capAction); return context; diff --git a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.json b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.json index 0e8987ba..d1452821 100644 --- a/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.json +++ b/aspnet-core/services/host/Lion.AbpPro.HttpApi.Host/appsettings.json @@ -31,19 +31,19 @@ }, "App": { "SelfUrl": "http://localhost:44315", - "CorsOrigins": "https://*.AbpPro.com,http://localhost:4200,http://182.43.18.151:44320,http://182.43.18.151:44321,http://182.43.18.151:44322,http://182.43.18.151:44318" + "CorsOrigins": "https://*.AbpPro.com,http://localhost:4200,http://localhost:44320,http://localhost:44321,http://localhost:44322,http://localhost:44318" }, "ConnectionStrings": { - "Default": "Data Source=182.43.18.151;Port=3306;Database=LionAbpProDemo9;uid=root;pwd=IFKy!Cufe3V9sYcz;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" + "Default": "Data Source=localhost;Port=3306;Database=LionAbpProDemo9;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" }, "Hangfire": { "Redis": { - "Host": "182.43.18.151:6379,password=1q2w3E*", + "Host": "localhost:6379,password=1q2w3E*", "DB": "2" } }, "Redis": { - "Configuration": "182.43.18.151:6379,password=1q2w3E*,defaultdatabase=9" + "Configuration": "localhost:6379,password=1q2w3E*,defaultdatabase=9" }, "Jwt": { "Audience": "Lion.AbpPro", @@ -52,7 +52,7 @@ "ExpirationTime": 2 }, "Cap": { - "Enabled": false, + "Enabled": true, "RabbitMq": { "HostName": "localhost", "UserName": "admin", diff --git a/aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings.json b/aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings.json index e63fa70b..226024d7 100644 --- a/aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings.json +++ b/aspnet-core/services/src/Lion.AbpPro.DbMigrator/appsettings.json @@ -1,5 +1,5 @@ { "ConnectionStrings": { - "Default": "Data Source=localhost;Port=3306;Database=LionAbpPro91;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" + "Default": "Data Source=localhost;Port=3306;Database=LionAbpProDemo9;uid=root;pwd=1q2w3E*;charset=utf8mb4;Allow User Variables=true;AllowLoadLocalInfile=true" } } \ No newline at end of file