option:剔除掉不必要的Redis客户端库

This commit is contained in:
hardstylewyl 2025-05-13 10:42:58 +08:00
parent 9bbefafcda
commit 8dcff695a4
2 changed files with 1 additions and 19 deletions

View File

@ -8,7 +8,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="BSI.Stack.Rabbit" Version="2.1.3" /> <PackageReference Include="BSI.Stack.Rabbit" Version="2.1.4" />
<PackageReference Include="Hangfire.AspNetCore" Version="1.8.18" /> <PackageReference Include="Hangfire.AspNetCore" Version="1.8.18" />
<PackageReference Include="Hangfire.Redis.StackExchange" Version="1.9.4" /> <PackageReference Include="Hangfire.Redis.StackExchange" Version="1.9.4" />
<PackageReference Include="Confluent.Kafka.Core" Version="1.0.0" /> <PackageReference Include="Confluent.Kafka.Core" Version="1.0.0" />
@ -16,8 +16,6 @@
<PackageReference Include="Savorboard.CAP.InMemoryMessageQueue" Version="8.2.1"/> <PackageReference Include="Savorboard.CAP.InMemoryMessageQueue" Version="8.2.1"/>
<PackageReference Include="SJZY.Expand.AliyunOSS" Version="7.0.17" /> <PackageReference Include="SJZY.Expand.AliyunOSS" Version="7.0.17" />
<PackageReference Include="SJZY.InterfaceRelay.Application.Contracts" Version="7.2.5-alpha2" /> <PackageReference Include="SJZY.InterfaceRelay.Application.Contracts" Version="7.2.5-alpha2" />
<PackageReference Include="StackExchange.Redis.Extensions.AspNetCore" Version="10.2.0" />
<PackageReference Include="StackExchange.Redis.Extensions.System.Text.Json" Version="10.2.0" />
<PackageReference Include="Volo.Abp.Http.Client" Version="7.0.2" /> <PackageReference Include="Volo.Abp.Http.Client" Version="7.0.2" />
<PackageReference Include="Volo.Abp.FluentValidation" Version="7.0.2" /> <PackageReference Include="Volo.Abp.FluentValidation" Version="7.0.2" />
<PackageReference Include="SJZY.UserCenter.HttpApi" Version="3.1.8.21" /> <PackageReference Include="SJZY.UserCenter.HttpApi" Version="3.1.8.21" />

View File

@ -22,8 +22,6 @@ using SJZY.Track.Application.Track2InterfaceRelay;
using SJZY.UserCenter.Contracts; using SJZY.UserCenter.Contracts;
using SJZY.UserCenter.SharedModel; using SJZY.UserCenter.SharedModel;
using SJZY.UserCenter.SharedModel.Pub; using SJZY.UserCenter.SharedModel.Pub;
using StackExchange.Redis.Extensions.Core.Configuration;
using StackExchange.Redis.Extensions.System.Text.Json;
using Volo.Abp.AspNetCore.Mvc; using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AutoMapper; using Volo.Abp.AutoMapper;
using Volo.Abp.FluentValidation; using Volo.Abp.FluentValidation;
@ -141,7 +139,6 @@ public class SjzyTrackApplicationModule : AbpModule
Console.WriteLine("-- 当前为VS本地环境,用内存存储和内存队列"); Console.WriteLine("-- 当前为VS本地环境,用内存存储和内存队列");
} }
context.Services.AddRabbitBoot(options => context.Services.AddRabbitBoot(options =>
{ {
options.ConnectionString = options.ConnectionString =
@ -201,19 +198,6 @@ public class SjzyTrackApplicationModule : AbpModule
$",password={configuration["Redis:Password"]}" + $",password={configuration["Redis:Password"]}" +
$",defaultDatabase={configuration["Redis:Database"]}" + $",defaultDatabase={configuration["Redis:Database"]}" +
$",abortConnect=false"; $",abortConnect=false";
// 注册Redis服务
context.Services.AddStackExchangeRedisExtensions<SystemTextJsonSerializer>(new RedisConfiguration
{
KeyPrefix = configuration["Redis:Prefix"]!,
Database = int.Parse(configuration["Redis:Database"]!),
ConnectionString = connectionString,
AbortOnConnectFail = false,
AllowAdmin = true,
//ConnectTimeout = 5000,
PoolSize = 5,
ConnectRetry = 3,
IsDefault = false,
});
// 注册预警计算服务 // 注册预警计算服务
//context.Services.AddWarningCalcServices(configuration); //context.Services.AddWarningCalcServices(configuration);