diff --git a/Yi.Framework/Yi.Framework.ApiMicroservice/Startup.cs b/Yi.Framework/Yi.Framework.ApiMicroservice/Startup.cs index 07bfa7b6..e863e697 100644 --- a/Yi.Framework/Yi.Framework.ApiMicroservice/Startup.cs +++ b/Yi.Framework/Yi.Framework.ApiMicroservice/Startup.cs @@ -54,6 +54,16 @@ namespace Yi.Framework.ApiMicroservice #endregion services.AddDataBaseService("SqliteConn"); + #region + //Redis服务配置 + #endregion + services.AddRedisService(); + + #region + //RabbitMQ服务配置 + #endregion + services.AddRabbitMQService(); + //下面这些应自动注入 services.AddScoped(); services.AddScoped(); diff --git a/Yi.Framework/Yi.Framework.Common/Class1.cs b/Yi.Framework/Yi.Framework.Common/Class1.cs deleted file mode 100644 index 0c3f5493..00000000 --- a/Yi.Framework/Yi.Framework.Common/Class1.cs +++ /dev/null @@ -1,8 +0,0 @@ -锘縰sing System; - -namespace Yi.Framework.Common -{ - public class Class1 - { - } -} diff --git a/Yi.Framework/Yi.Framework.Common/IOCOptions/KafkaOptions.cs b/Yi.Framework/Yi.Framework.Common/IOCOptions/KafkaOptions.cs index 7afcc735..cfc6955e 100644 --- a/Yi.Framework/Yi.Framework.Common/IOCOptions/KafkaOptions.cs +++ b/Yi.Framework/Yi.Framework.Common/IOCOptions/KafkaOptions.cs @@ -8,7 +8,6 @@ namespace Yi.Framework.Common.IOCOptions { public class KafkaOptions { - public string BrokerList { get; set; } public string TopicName { get; set; } } diff --git a/Yi.Framework/Yi.Framework.Core/RabbitMQInvoker.cs b/Yi.Framework/Yi.Framework.Core/RabbitMQInvoker.cs index 0b7da2cd..8a6f92d3 100644 --- a/Yi.Framework/Yi.Framework.Core/RabbitMQInvoker.cs +++ b/Yi.Framework/Yi.Framework.Core/RabbitMQInvoker.cs @@ -8,7 +8,7 @@ using System.Text; using System.Threading.Tasks; using Yi.Framework.Common.IOCOptions; -namespace CC.ElectronicCommerce.Core +namespace Yi.Framework.Core { /// /// 涓涓狤xchange----澶氫釜Queue-----寮勪釜缂撳瓨鏄犲皠鍏崇郴锛屽垵濮嬪寲+鏀寔鍏ㄦ柊缁戝畾 diff --git a/Yi.Framework/Yi.Framework.WebCore/MiddlewareExtend/RabbitMQExtension.cs b/Yi.Framework/Yi.Framework.WebCore/MiddlewareExtend/RabbitMQExtension.cs new file mode 100644 index 00000000..2847fb98 --- /dev/null +++ b/Yi.Framework/Yi.Framework.WebCore/MiddlewareExtend/RabbitMQExtension.cs @@ -0,0 +1,21 @@ +锘縰sing Microsoft.AspNetCore.Builder; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.OpenApi.Models; +using System; +using System.IO; +using Yi.Framework.Common.IOCOptions; + +namespace Yi.Framework.WebCore.MiddlewareExtend +{ + /// + /// Redis鎵╁睍 + /// + public static class RabbitMQExtension + { + public static IServiceCollection AddRabbitMQService(this IServiceCollection services) + { + Appsettings.app("RabbitConn"); + return services; + } + } +} diff --git a/Yi.Framework/Yi.Framework.WebCore/MiddlewareExtend/RedisExtension.cs b/Yi.Framework/Yi.Framework.WebCore/MiddlewareExtend/RedisExtension.cs new file mode 100644 index 00000000..bfa248d4 --- /dev/null +++ b/Yi.Framework/Yi.Framework.WebCore/MiddlewareExtend/RedisExtension.cs @@ -0,0 +1,21 @@ +锘縰sing Microsoft.AspNetCore.Builder; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.OpenApi.Models; +using System; +using System.IO; +using Yi.Framework.Common.IOCOptions; + +namespace Yi.Framework.WebCore.MiddlewareExtend +{ + /// + /// Redis鎵╁睍 + /// + public static class RedisExtension + { + public static IServiceCollection AddRedisService(this IServiceCollection services) + { + Appsettings.app("RedisConn"); + return services; + } + } +}