feat: 支持默认启用redis
This commit is contained in:
@@ -185,12 +185,12 @@ namespace Yi.Abp.Application.Services
|
||||
/// <summary>
|
||||
/// 分布式送abp版本:abp套了一层娃。但是纯粹鸡肋,不建议使用这个
|
||||
/// </summary>
|
||||
public IAbpDistributedLock AbpDistributedLock { get; set; }
|
||||
|
||||
public IAbpDistributedLock AbpDistributedLock => LazyServiceProvider.LazyGetService<IAbpDistributedLock>();
|
||||
|
||||
/// <summary>
|
||||
/// 分布式锁推荐使用版本:yyds,分布式锁永远的神!
|
||||
/// </summary>
|
||||
public IDistributedLockProvider DistributedLock { get; set; }
|
||||
public IDistributedLockProvider DistributedLock => LazyServiceProvider.LazyGetService<IDistributedLockProvider>();
|
||||
|
||||
/// <summary>
|
||||
/// 分布式锁
|
||||
|
||||
@@ -204,7 +204,7 @@ namespace Yi.Abp.Web
|
||||
var redisConfiguration = configuration["Redis:Configuration"];
|
||||
context.Services.AddHangfire(config=>
|
||||
{
|
||||
bool.TryParse( configuration["Redis:IsEnabled"], out var redisEnabled);
|
||||
var redisEnabled=configuration.GetSection("Redis").GetValue<bool>("IsEnabled");
|
||||
if (redisEnabled)
|
||||
{
|
||||
var jobDb=configuration.GetSection("Redis").GetValue<int>("JobDb");
|
||||
|
||||
Reference in New Issue
Block a user