This commit is contained in:
qianjiawei
2023-11-07 16:16:50 +08:00
parent 1dbb17f103
commit f76a04059d
6 changed files with 319 additions and 44 deletions

View File

@@ -5,5 +5,11 @@
"port": 6379,
"password": "05jWEoJa8v",
"RedisConnectionString": "{0}:{1},password={2}, poolsize=500,ssl=false,defaultDatabase=7"
},
"Redis": {
"ip": "localhost",
"port": 6379,
"password": "05jWEoJa8v",
"RedisConnectionString": "{0}:{1},password={2}, poolsize=500,ssl=false,defaultDatabase=0"
}
}

View File

@@ -2,6 +2,7 @@
using JNPF.Common.Cache;
using JNPF.Common.Core.Handlers;
using JNPF.Common.Security;
using JNPF.DependencyInjection;
using JNPF.SpecificationDocument;
using JNPF.TaskScheduler.Interfaces.TaskScheduler;
using JNPF.VisualDev;
@@ -11,6 +12,7 @@ using Senparc.CO2NET.RegisterServices;
using Senparc.Weixin;
using Senparc.Weixin.Entities;
using Senparc.Weixin.RegisterServices;
using Tnb.Common.Redis;
using Tnb.ProductionMgr;
using Tnb.WarehouseMgr;
@@ -46,7 +48,7 @@ public class Startup : AppStartup
services.AddMemoryCache(); // 使用本地缓存必须添加
services.AddConfigurableOptions<CacheOptions>();
services.AddSingleton( typeof(ISingleton), typeof(RedisData));
// 微信
services.AddSenparcGlobalServices(App.Configuration) // Senparc.CO2NET 全局注册
.AddSenparcWeixinServices(App.Configuration); // Senparc.Weixin 注册如果使用Senparc.Weixin SDK则添加