添加startup各类服务
This commit is contained in:
@@ -54,6 +54,16 @@ namespace Yi.Framework.ApiMicroservice
|
|||||||
#endregion
|
#endregion
|
||||||
services.AddDataBaseService<SqliteOptions>("SqliteConn");
|
services.AddDataBaseService<SqliteOptions>("SqliteConn");
|
||||||
|
|
||||||
|
#region
|
||||||
|
//Redis<69><73><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
#endregion
|
||||||
|
services.AddRedisService();
|
||||||
|
|
||||||
|
#region
|
||||||
|
//RabbitMQ<4D><51><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
#endregion
|
||||||
|
services.AddRabbitMQService();
|
||||||
|
|
||||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ЩӦ<D0A9>Զ<EFBFBD>ע<EFBFBD><D7A2>
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ЩӦ<D0A9>Զ<EFBFBD>ע<EFBFBD><D7A2>
|
||||||
services.AddScoped<IUserService, UserService>();
|
services.AddScoped<IUserService, UserService>();
|
||||||
services.AddScoped<IRoleService, RoleService>();
|
services.AddScoped<IRoleService, RoleService>();
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
using System;
|
|
||||||
|
|
||||||
namespace Yi.Framework.Common
|
|
||||||
{
|
|
||||||
public class Class1
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -8,7 +8,6 @@ namespace Yi.Framework.Common.IOCOptions
|
|||||||
{
|
{
|
||||||
public class KafkaOptions
|
public class KafkaOptions
|
||||||
{
|
{
|
||||||
|
|
||||||
public string BrokerList { get; set; }
|
public string BrokerList { get; set; }
|
||||||
public string TopicName { get; set; }
|
public string TopicName { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ using System.Text;
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Yi.Framework.Common.IOCOptions;
|
using Yi.Framework.Common.IOCOptions;
|
||||||
|
|
||||||
namespace CC.ElectronicCommerce.Core
|
namespace Yi.Framework.Core
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 一个Exchange----多个Queue-----弄个缓存映射关系,初始化+支持全新绑定
|
/// 一个Exchange----多个Queue-----弄个缓存映射关系,初始化+支持全新绑定
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
using 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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Redis扩展
|
||||||
|
/// </summary>
|
||||||
|
public static class RabbitMQExtension
|
||||||
|
{
|
||||||
|
public static IServiceCollection AddRabbitMQService(this IServiceCollection services)
|
||||||
|
{
|
||||||
|
Appsettings.app<RabbitMQOptions>("RabbitConn");
|
||||||
|
return services;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
using 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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Redis扩展
|
||||||
|
/// </summary>
|
||||||
|
public static class RedisExtension
|
||||||
|
{
|
||||||
|
public static IServiceCollection AddRedisService(this IServiceCollection services)
|
||||||
|
{
|
||||||
|
Appsettings.app<RedisConnOptions>("RedisConn");
|
||||||
|
return services;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user