From 1e699fb7dbf251831c683deb2a5e12431ec3c1b3 Mon Sep 17 00:00:00 2001 From: majian <780924089@qq.com> Date: Tue, 23 Apr 2024 10:20:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Configurations/AppSetting.json | 21 +++++++++++++++++++ .../Tnb.API.Entry/Configurations/Cache.json | 4 ++-- .../Configurations/ConnectionStrings.json | 4 ++-- 3 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 apihost/Tnb.API.Entry/Configurations/AppSetting.json diff --git a/apihost/Tnb.API.Entry/Configurations/AppSetting.json b/apihost/Tnb.API.Entry/Configurations/AppSetting.json new file mode 100644 index 00000000..283832df --- /dev/null +++ b/apihost/Tnb.API.Entry/Configurations/AppSetting.json @@ -0,0 +1,21 @@ +{ + "AppSettings": { + "InjectMiniProfiler": true, + "SupportPackageNamePrefixs": [ "Tnb" ] + }, + "Kestrel": { + "Endpoints": { + "Http": { + "Url": "http://0.0.0.0:9231" + } + } + }, + "YitId": { + "WorkerId": 1, //必须 全局唯一,必须 程序设定,理论最大值 2^WorkerIdBitLength-1 + "WorkerIdBitLength": 4, //机器码位长,决定 WorkerId 的最大值,默认值6,取值范围 [1, 16] + "SeqBitLength": 4 //序列数位长,默认值6,取值范围 [3, 21](建议不小于4),决定每毫秒基础生成的ID个数 + }, + "UnifyResultSettings": { + "ShowExceptionDetail": true + } +} \ No newline at end of file diff --git a/apihost/Tnb.API.Entry/Configurations/Cache.json b/apihost/Tnb.API.Entry/Configurations/Cache.json index 6b399190..ed558c59 100644 --- a/apihost/Tnb.API.Entry/Configurations/Cache.json +++ b/apihost/Tnb.API.Entry/Configurations/Cache.json @@ -1,13 +1,13 @@ { "Cache": { "CacheType": "RedisCache", //MemoryCache - "ip": "192.168.11.109", + "ip": "127.0.0.1", "port": 6379, "password": "05jWEoJa8v", "RedisConnectionString": "{0}:{1},password={2}, poolsize=500,ssl=false,defaultDatabase=0" }, "Redis": { - "ip": "192.168.11.109", + "ip": "127.0.0.1", "port": 6379, "password": "05jWEoJa8v", "RedisConnectionString": "{0}:{1},password={2}, poolsize=500,ssl=false,defaultDatabase=0" diff --git a/apihost/Tnb.API.Entry/Configurations/ConnectionStrings.json b/apihost/Tnb.API.Entry/Configurations/ConnectionStrings.json index 3195bfb6..cedc7a1b 100644 --- a/apihost/Tnb.API.Entry/Configurations/ConnectionStrings.json +++ b/apihost/Tnb.API.Entry/Configurations/ConnectionStrings.json @@ -2,8 +2,8 @@ "ConnectionStrings": { "ConfigId": "default", "DBType": "PostgreSQL", //MySql;SqlServer;Oracle;PostgreSQL;Dm;Kdbndp;Sqlite; - "Host": "192.168.11.109", - //"Host": "127.0.0.1", + //"Host": "192.168.11.109", + "Host": "127.0.0.1", "Port": "5432", //"DBName": "tianyi_db", //"UserName": "postgres",