配置项修改

master
xiaochanghai 1 year ago
parent 612b1e8c01
commit 05a5aceabc
  1. 674
      Tiobon.Core.Api/appsettings.json
  2. 4
      Tiobon.Core.Api/index.html
  3. 4
      Tiobon.Core.Extensions/ServiceExtensions/SwaggerSetup.cs

@ -1,99 +1,99 @@
{
"urls": "http://*:9291", //webIIS
"Serilog": {
"MinimumLevel": {
"Default": "Debug",
"Override": {
"Microsoft": "Information",
"Microsoft.AspNetCore": "Warning",
"System": "Warning",
"System.Net.Http.HttpClient": "Warning",
"Hangfire": "Information",
"Magicodes": "Warning",
"DotNetCore.CAP": "Information",
"Savorboard.CAP": "Information",
"Quartz": "Information"
}
}
},
"AllowedHosts": "*",
"Redis": {
"Enable": false,
"ConnectionString": "127.0.0.1:6379",
"InstanceName": "" //
},
"RabbitMQ": {
"Enabled": true,
"Connection": "101xxxx57",
"UserName": "xxxx",
"Password": "xxxxx",
"Port": "5672",
"RetryCount": 2
},
"Kafka": {
"Enabled": false,
"Servers": "localhost:9092",
"Topic": "Tiobon",
"GroupId": "Tiobon-consumer",
"NumPartitions": 3 //
},
"EventBus": {
"Enabled": false,
"SubscriptionClientName": "Tiobon.Core"
},
"AppSettings": {
"CachingAOP": {
"Enabled": true
"urls": "http://*:9291", //webIIS
"Serilog": {
"MinimumLevel": {
"Default": "Debug",
"Override": {
"Microsoft": "Information",
"Microsoft.AspNetCore": "Warning",
"System": "Warning",
"System.Net.Http.HttpClient": "Warning",
"Hangfire": "Information",
"Magicodes": "Warning",
"DotNetCore.CAP": "Information",
"Savorboard.CAP": "Information",
"Quartz": "Information"
}
}
},
"AllowedHosts": "*",
"Redis": {
"Enable": false,
"ConnectionString": "127.0.0.1:6379",
"InstanceName": "" //
},
"LogToDb": true,
"LogAOP": {
"Enabled": false,
"LogToFile": {
"Enabled": true
},
"LogToDB": {
"Enabled": true
}
"RabbitMQ": {
"Enabled": true,
"Connection": "101xxxx57",
"UserName": "xxxx",
"Password": "xxxxx",
"Port": "5672",
"RetryCount": 2
},
"TranAOP": {
"Enabled": true
"Kafka": {
"Enabled": false,
"Servers": "localhost:9092",
"Topic": "Tiobon",
"GroupId": "Tiobon-consumer",
"NumPartitions": 3 //
},
"UserAuditAOP": {
"Enabled": false
"EventBus": {
"Enabled": false,
"SubscriptionClientName": "Tiobon.Core"
},
"SqlAOP": {
"Enabled": true,
"LogToFile": {
"Enabled": true
},
"LogToDB": {
"Enabled": true
},
"LogToConsole": {
"Enabled": true
}
"AppSettings": {
"CachingAOP": {
"Enabled": true
},
"LogToDb": true,
"LogAOP": {
"Enabled": false,
"LogToFile": {
"Enabled": true
},
"LogToDB": {
"Enabled": true
}
},
"TranAOP": {
"Enabled": true
},
"UserAuditAOP": {
"Enabled": false
},
"SqlAOP": {
"Enabled": true,
"LogToFile": {
"Enabled": true
},
"LogToDB": {
"Enabled": true
},
"LogToConsole": {
"Enabled": true
}
},
"Date": "2018-08-28",
"SeedDBEnabled": true, //
"SeedDBDataEnabled": true, //,
"Author": "Tiobon.Core",
"SvcName": "", // /svc/Tiobon
"UseLoadTest": false
},
"Date": "2018-08-28",
"SeedDBEnabled": true, //
"SeedDBDataEnabled": true, //,
"Author": "Tiobon.Core",
"SvcName": "", // /svc/Tiobon
"UseLoadTest": false
},
//DB
//MainDbEnabledtrue
//Log:Enabledtrue
//Slaves,!SqlServer
//
//,
//,(+)
//ConnIdConnId+,ConnIdMain,ConnIdMian1
//!
//,
"MainDB": "Main", //Enabledtrue
"DBS": [
/*
//DB
//MainDbEnabledtrue
//Log:Enabledtrue
//Slaves,!SqlServer
//
//,
//,(+)
//ConnIdConnId+,ConnIdMain,ConnIdMian1
//!
//,
"MainDB": "WMTiobon_MSSQL_Main", //Enabledtrue
"DBS": [
/*
DBType
MySql = 0,
SqlServer = 1,
@ -103,261 +103,269 @@
Dm = 5,//
Kdbndp = 6,//
*/
{
"ConnId": "Main",
"DBType": 2,
"Enabled": true,
"Connection": "WMTiobon.db", //sqlite
"Slaves": [
{
"HitRate": 0,// 0使
"Connection": "WMTiobon2.db"
}
]
},
{
"ConnId": "Main2",
"DBType": 2,
"Enabled": true,
"Connection": "WMTiobon3.db", //sqlite
"Slaves": [
"ConnId": "WMTiobon_MSSQL_Main",
"DBType": 1,
"Enabled": true,
"Connection": "Data Source=116.204.98.209;User ID=Tiobon;Password=&($!4UGUyU#$2sp9O;Database=Tiobon;Encrypt=True;TrustServerCertificate=True;",
"ProviderName": "System.Data.SqlClient"
},
{
"ConnId": "Main",
"DBType": 2,
"Enabled": false,
"Connection": "WMTiobon.db", //sqlite
"Slaves": [
{
"HitRate": 0, // 0使
"Connection": "WMTiobon2.db"
}
]
},
{
"ConnId": "Main2",
"DBType": 2,
"Enabled": false,
"Connection": "WMTiobon3.db", //sqlite
"Slaves": [
{
"HitRate": 0, // 0使
"Connection": "WMTiobon4.db"
}
]
},
{
"ConnId": "Log", //,
"DBType": 1,
"Enabled": true,
"HitRate": 50,
"Connection": "Data Source=116.204.98.209;User ID=Tiobon;Password=&($!4UGUyU#$2sp9O;Database=Tiobon;Encrypt=True;TrustServerCertificate=True;",
"ProviderName": "System.Data.SqlClient"
},
{
"ConnId": "WMTiobon_MSSQL_1",
"DBType": 1,
"Enabled": false,
"Connection": "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=WMTiobon_MSSQL_1;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
"ProviderName": "System.Data.SqlClient"
},
{
"HitRate": 0,// 0使
"Connection": "WMTiobon4.db"
"ConnId": "WMTiobon_MSSQL_2",
"DBType": 1,
"Enabled": false,
"Connection": "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=WMTiobon_MSSQL_2;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
"ProviderName": "System.Data.SqlClient"
},
{
"ConnId": "WMTiobon_MYSQL",
"DBType": 0,
"Enabled": false,
"Connection": "server=localhost;Database=Tiobon;Uid=root;Pwd=root;Port=3306;Allow User Variables=True;"
},
{
"ConnId": "WMTiobon_MYSQL_2",
"DBType": 0,
"Enabled": false,
"Connection": "server=localhost;Database=Tioboncore001;Uid=root;Pwd=root;Port=3306;Allow User Variables=True;"
},
{
"ConnId": "WMTiobon_ORACLE",
"DBType": 3,
"Enabled": false,
"Connection": "Data Source=127.0.0.1/ops;User ID=OPS;Password=123456;Persist Security Info=True;Connection Timeout=60;"
},
{
"ConnId": "WMTiobon_DM",
"DBType": 5,
"Enabled": false,
"Connection": "Server=xxxxx:5236;User Id=xxxxx;PWD=xxxxx;SCHEMA=TESTDBA;"
},
{
"ConnId": "WMTiobon_KDBNDP",
"DBType": 6,
"Enabled": false,
"Connection": "Server=127.0.0.1;Port=54321;UID=SYSTEM;PWD=system;database=SQLSUGAR4XTEST1;"
}
]
},
{
"ConnId": "Log", //,
"DBType": 2,
"Enabled": true,
"HitRate": 50,
"Connection": "WMTiobonLog.db" //sqlite
},
{
"ConnId": "WMTiobon_MSSQL_1",
"DBType": 1,
"Enabled": false,
"Connection": "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=WMTiobon_MSSQL_1;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
"ProviderName": "System.Data.SqlClient"
},
{
"ConnId": "WMTiobon_MSSQL_2",
"DBType": 1,
"Enabled": false,
"Connection": "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=WMTiobon_MSSQL_2;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False",
"ProviderName": "System.Data.SqlClient"
},
{
"ConnId": "WMTiobon_MYSQL",
"DBType": 0,
"Enabled": false,
"Connection": "server=localhost;Database=Tiobon;Uid=root;Pwd=root;Port=3306;Allow User Variables=True;"
],
"Audience": {
"Secret": "sdfsdfsrty45634kkhllghtdgdfss345t678fs", //16+
"SecretFile": "C:\\my-file\\Tiobon.core.audience.secret.txt", //Secret
"Issuer": "Tiobon.Core", //
"Audience": "wr" //
},
{
"ConnId": "WMTiobon_MYSQL_2",
"DBType": 0,
"Enabled": false,
"Connection": "server=localhost;Database=Tioboncore001;Uid=root;Pwd=root;Port=3306;Allow User Variables=True;"
"Mongo": {
"ConnectionString": "mongodb://nosql.data",
"Database": "TiobonCoreDb"
},
{
"ConnId": "WMTiobon_ORACLE",
"DBType": 3,
"Enabled": false,
"Connection": "Data Source=127.0.0.1/ops;User ID=OPS;Password=123456;Persist Security Info=True;Connection Timeout=60;"
},
{
"ConnId": "WMTiobon_DM",
"DBType": 5,
"Enabled": false,
"Connection": "Server=xxxxx:5236;User Id=xxxxx;PWD=xxxxx;SCHEMA=TESTDBA;"
},
{
"ConnId": "WMTiobon_KDBNDP",
"DBType": 6,
"Enabled": false,
"Connection": "Server=127.0.0.1;Port=54321;UID=SYSTEM;PWD=system;database=SQLSUGAR4XTEST1;"
}
],
"Audience": {
"Secret": "sdfsdfsrty45634kkhllghtdgdfss345t678fs", //16+
"SecretFile": "C:\\my-file\\Tiobon.core.audience.secret.txt", //Secret
"Issuer": "Tiobon.Core", //
"Audience": "wr" //
},
"Mongo": {
"ConnectionString": "mongodb://nosql.data",
"Database": "TiobonCoreDb"
},
"Startup": {
"Domain": "http://localhost:9291",
"Cors": {
"PolicyName": "CorsIpAccess", //
"EnableAllIPs": false, //trueIP访
// /localhost:8000/
// http://127.0.0.1:1818 http://localhost:1818
"IPs": "http://127.0.0.1:2364,http://localhost:2364,http://127.0.0.1:6688,http://localhost:6688"
},
"AppConfigAlert": {
"Enabled": true
},
"ApiName": "Tiobon.Core",
"IdentityServer4": {
"Enabled": false, // false使jwttrue使Ids4
"AuthorizationUrl": "http://localhost:5004", //
"ApiName": "Tiobon.core.api" //
},
"Authing": {
"Enabled": false,
"Issuer": "https://uldr24esx31h-demo.authing.cn/oidc",
"Audience": "63d51c4205c2849803be5178",
"JwksUri": "https://uldr24esx31h-demo.authing.cn/oidc/.well-known/jwks.json"
},
"RedisMq": {
"Enabled": false //redis
},
"MiniProfiler": {
"Enabled": false //
},
"Nacos": {
"Enabled": false //Nacos
}
},
"Middleware": {
"RequestResponseLog": {
"Enabled": true,
"LogToFile": {
"Enabled": true
},
"LogToDB": {
"Enabled": true
}
},
"IPLog": {
"Enabled": true,
"LogToFile": {
"Enabled": true
},
"LogToDB": {
"Enabled": true
}
},
"RecordAccessLogs": {
"Enabled": true,
"LogToFile": {
"Enabled": true
},
"LogToDB": {
"Enabled": true
},
"IgnoreApis": "/api/permission/getnavigationbar,/api/monitor/getids4users,/api/monitor/getaccesslogs,/api/monitor/server,/api/monitor/getactiveusers,/api/monitor/server,"
"Startup": {
"Domain": "http://localhost:9291",
"Cors": {
"PolicyName": "CorsIpAccess", //
"EnableAllIPs": false, //trueIP访
// /localhost:8000/
// http://127.0.0.1:1818 http://localhost:1818
"IPs": "http://127.0.0.1:2364,http://localhost:2364,http://127.0.0.1:6688,http://localhost:6688"
},
"AppConfigAlert": {
"Enabled": true
},
"ApiName": "Tiobon.Core",
"IdentityServer4": {
"Enabled": false, // false使jwttrue使Ids4
"AuthorizationUrl": "http://localhost:5004", //
"ApiName": "Tiobon.core.api" //
},
"Authing": {
"Enabled": false,
"Issuer": "https://uldr24esx31h-demo.authing.cn/oidc",
"Audience": "63d51c4205c2849803be5178",
"JwksUri": "https://uldr24esx31h-demo.authing.cn/oidc/.well-known/jwks.json"
},
"RedisMq": {
"Enabled": false //redis
},
"MiniProfiler": {
"Enabled": false //
},
"Nacos": {
"Enabled": false //Nacos
}
},
"SignalR": {
"Enabled": true
"Middleware": {
"RequestResponseLog": {
"Enabled": true,
"LogToFile": {
"Enabled": true
},
"LogToDB": {
"Enabled": true
}
},
"IPLog": {
"Enabled": true,
"LogToFile": {
"Enabled": true
},
"LogToDB": {
"Enabled": true
}
},
"RecordAccessLogs": {
"Enabled": true,
"LogToFile": {
"Enabled": true
},
"LogToDB": {
"Enabled": true
},
"IgnoreApis": "/api/permission/getnavigationbar,/api/monitor/getids4users,/api/monitor/getaccesslogs,/api/monitor/server,/api/monitor/getactiveusers,/api/monitor/server,"
},
"SignalR": {
"Enabled": true
},
"SignalRSendLog": {
"Enabled": true
},
"QuartzNetJob": {
"Enabled": true
},
"Consul": {
"Enabled": false
},
"IpRateLimit": {
"Enabled": true
},
"EncryptionResponse": {
"Enabled": true,
"AllApis": false,
"LimitApis": [
"/api/Login/GetJwtTokenSecret"
]
},
"EncryptionRequest": {
"Enabled": true,
"AllApis": false,
"LimitApis": [
"/api/Login/GetJwtTokenSecret"
]
}
},
"SignalRSendLog": {
"Enabled": true
"IpRateLimiting": {
"EnableEndpointRateLimiting": true, //False: globally executed, true: executed for each
"StackBlockedRequests": false, //False: Number of rejections should be recorded on another counter
"RealIpHeader": "X-Real-IP",
"ClientIdHeader": "X-ClientId",
"IpWhitelist": [], //
"EndpointWhitelist": [ "get:/api/xxx", "*:/api/yyy" ],
"ClientWhitelist": [ "dev-client-1", "dev-client-2" ],
"QuotaExceededResponse": {
"Content": "{{\"status\":429,\"msg\":\"访问过于频繁,请稍后重试\",\"success\":false}}",
"ContentType": "application/json",
"StatusCode": 429
},
"HttpStatusCode": 429, //
"GeneralRules": [ //api,*
{
"Endpoint": "*:/api/Tiobon*",
"Period": "1m",
"Limit": 20
},
{
"Endpoint": "*/api/*",
"Period": "1s",
"Limit": 3
},
{
"Endpoint": "*/api/*",
"Period": "1m",
"Limit": 30
},
{
"Endpoint": "*/api/*",
"Period": "12h",
"Limit": 500
}
]
},
"QuartzNetJob": {
"Enabled": true
"ConsulSetting": {
"ServiceName": "TiobonCoreService",
"ServiceIP": "localhost",
"ServicePort": "9291",
"ServiceHealthCheck": "/healthcheck",
"ConsulAddress": "http://localhost:8500"
},
"Consul": {
"Enabled": false
"PayInfo": { //
"MERCHANTID": "", //
"POSID": "", //
"BRANCHID": "", //
"pubKey": "", //
"USER_ID": "", //
"PASSWORD": "", //
"OutAddress": "http://127.0.0.1:12345" //
},
"IpRateLimit": {
"Enabled": true
"nacos": {
"ServerAddresses": [ "http://localhost:8848" ], // nacos
"DefaultTimeOut": 15000, //
"Namespace": "public", //
"ListenInterval": 10000, //
"ServiceName": "Tiobon.Core.Api", //
"Port": "9291", //
"RegisterEnabled": true // nacos
},
"EncryptionResponse": {
"Enabled": true,
"AllApis": false,
"LimitApis": [
"/api/Login/GetJwtTokenSecret"
]
"LogFiedOutPutConfigs": {
"tcpAddressHost": "", // elktcp
"tcpAddressPort": 0, // elktcp
"ConfigsInfo": [ // elk
{
"FiedName": "applicationName",
"FiedValue": "Tiobon.Core.Api"
}
]
},
"EncryptionRequest": {
"Enabled": true,
"AllApis": false,
"LimitApis": [
"/api/Login/GetJwtTokenSecret"
]
"Seq": {
"Enabled": true,
"Address": "http://localhost:5341/",
"ApiKey": ""
}
},
"IpRateLimiting": {
"EnableEndpointRateLimiting": true, //False: globally executed, true: executed for each
"StackBlockedRequests": false, //False: Number of rejections should be recorded on another counter
"RealIpHeader": "X-Real-IP",
"ClientIdHeader": "X-ClientId",
"IpWhitelist": [], //
"EndpointWhitelist": [ "get:/api/xxx", "*:/api/yyy" ],
"ClientWhitelist": [ "dev-client-1", "dev-client-2" ],
"QuotaExceededResponse": {
"Content": "{{\"status\":429,\"msg\":\"访问过于频繁,请稍后重试\",\"success\":false}}",
"ContentType": "application/json",
"StatusCode": 429
},
"HttpStatusCode": 429, //
"GeneralRules": [ //api,*
{
"Endpoint": "*:/api/Tiobon*",
"Period": "1m",
"Limit": 20
},
{
"Endpoint": "*/api/*",
"Period": "1s",
"Limit": 3
},
{
"Endpoint": "*/api/*",
"Period": "1m",
"Limit": 30
},
{
"Endpoint": "*/api/*",
"Period": "12h",
"Limit": 500
}
]
},
"ConsulSetting": {
"ServiceName": "TiobonCoreService",
"ServiceIP": "localhost",
"ServicePort": "9291",
"ServiceHealthCheck": "/healthcheck",
"ConsulAddress": "http://localhost:8500"
},
"PayInfo": { //
"MERCHANTID": "", //
"POSID": "", //
"BRANCHID": "", //
"pubKey": "", //
"USER_ID": "", //
"PASSWORD": "", //
"OutAddress": "http://127.0.0.1:12345" //
},
"nacos": {
"ServerAddresses": [ "http://localhost:8848" ], // nacos
"DefaultTimeOut": 15000, //
"Namespace": "public", //
"ListenInterval": 10000, //
"ServiceName": "Tiobon.Core.Api", //
"Port": "9291", //
"RegisterEnabled": true // nacos
},
"LogFiedOutPutConfigs": {
"tcpAddressHost": "", // elktcp
"tcpAddressPort": 0, // elktcp
"ConfigsInfo": [ // elk
{
"FiedName": "applicationName",
"FiedValue": "Tiobon.Core.Api"
}
]
},
"Seq": {
"Enabled": true,
"Address": "http://localhost:5341/",
"ApiKey": ""
}
}

@ -111,7 +111,7 @@
</svg>
<div id="swagger-ui"></div>
<div id="footer" style="text-align: center;margin-bottom: 10px;">
Copyright © 2018-2023 BCVP开发者社区
Copyright © 2018-2023 苏州工业园区乔邦科技有限公司
<br><span id="poweredby">Powered by .NET 8.0 on Docker & CentOS 7.6</span>
</div>
@ -168,7 +168,7 @@
setTimeout(() => {
//二维码
$('.info').append("<div class='qqgroup'><img src='https://img.neters.club/doc/wechatgongzhonghao.png' alt='QQ二维码' style='width: 150px;margin-bottom: 15px;'><div style=\"color: #4990e2;\"><a href=\"../allservices\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"link\">· 查看所有依赖注册的服务</a><br><a href=\"../ui\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"link\">· 查看前端配套页面</a></div></div><div style='clear: both;'></div>");
//$('.info').append("<div class='qqgroup'><img src='https://img.neters.club/doc/wechatgongzhonghao.png' alt='QQ二维码' style='width: 150px;margin-bottom: 15px;'><div style=\"color: #4990e2;\"><a href=\"../allservices\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"link\">· 查看所有依赖注册的服务</a><br><a href=\"../ui\" target=\"_blank\" rel=\"noopener noreferrer\" class=\"link\">· 查看前端配套页面</a></div></div><div style='clear: both;'></div>");
//修改 token授权按钮为中文
$(".auth-wrapper span").empty();

@ -35,8 +35,8 @@ namespace Tiobon.Core.Extensions
Version = version,
Title = $"{ApiName} 接口文档——{RuntimeInformation.FrameworkDescription}",
Description = $"{ApiName} HTTP API " + version,
Contact = new OpenApiContact { Name = ApiName, Email = "Tiobon.Core@xxx.com", Url = new Uri("https://neters.club") },
License = new OpenApiLicense { Name = ApiName + " 官方文档", Url = new Uri("http://apk.neters.club/.doc/") }
//Contact = new OpenApiContact { Name = ApiName, Email = "Tiobon.Core@xxx.com", Url = new Uri("https://neters.club") },
//License = new OpenApiLicense { Name = ApiName + " 官方文档", Url = new Uri("http://apk.neters.club/.doc/") }
});
c.OrderActionsBy(o => o.RelativePath);
});

Loading…
Cancel
Save