mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-03-20 00:16:37 +08:00
配置文件开关,数据库读写分离
This commit is contained in:
@@ -14,8 +14,12 @@ namespace Yi.Framework.WebCore.MiddlewareExtend
|
||||
{
|
||||
public static IServiceCollection AddRabbitMQService(this IServiceCollection services)
|
||||
{
|
||||
services.Configure<RabbitMQOptions>(Appsettings.appConfiguration("RabbitConn"));
|
||||
if (Appsettings.appBool("RabbitMQ_Enabled"))
|
||||
{
|
||||
services.Configure<RabbitMQOptions>(Appsettings.appConfiguration("RabbitConn"));
|
||||
}
|
||||
return services;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user